Question

Please, suggest me how I can parse and handle coordinates that originally come as text:

N5004.8 E01300.0

As far I know, the first thing is replace North/South and East/West to positive and negative values, but which are negative?. South and West?

The second thing, confirm my assumption that it can be written as double in .NET as

50.048d and 1.300d

Is't correct assumption?

And the last thing is how I can use System.Data.Entity.Spatial.DbGeography to save these coordinates to SQL?

Thanks.

No correct solution

OTHER TIPS

Here is a tutorial that shows how to use spatial types with EF http://msdn.microsoft.com/en-us/data/hh859721.aspx. This article can also be helpful. As for parsing EF is using so called Well Known Text (WKT) and your format does not look like it so you will most likely will have to understand what format your data is using and translate it accordingly.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top