Skip to content

Set Geography.IsLargerThanAHemisphere value - #17

Draft
FObermaier wants to merge 2 commits into
developfrom
enhancement/is_larger_than_hemisphere_check
Draft

Set Geography.IsLargerThanAHemisphere value#17
FObermaier wants to merge 2 commits into
developfrom
enhancement/is_larger_than_hemisphere_check

Conversation

@FObermaier

Copy link
Copy Markdown
Member

No description provided.

Add initial unit tests. It seems that using GeocentricTransform is overkill, plain sphere math might do, @brieclam?
@FObermaier
FObermaier marked this pull request as draft April 13, 2021 12:08
@bricelam

Copy link
Copy Markdown
Collaborator

The SQL Server serialization format has a flag for this too--the H bit of the Serialization Properties byte in version 2 of the GEOGRAPHY structure.

Can we add a test serializing one of these values to make sure we match the SQL Server behavior?

@bricelam

bricelam commented Apr 13, 2021

Copy link
Copy Markdown
Collaborator

Ah, I see, this is setting the flag so it gets serialized. 🤦

In that case, yeah, adding a serialization test would be nice. You can get the bytes SQL Server returns using a query like the following.

SELECT CONVERT(nvarchar, geography::STGeomFromText('POINT (0 90)', 4326).STBuffer(500).Serialize(), 2);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants