Thursday, December 30, 2010 8:07 PMIm working on the Silverlight control I have a situation where I reduce polygons on the server based on the LocationRect I pass from the client. My problem is when I have the east cooridinate less than the west (dateline issues), I know its a common scenario but I haven't found the right algorithim to get the right east and west points. Can you direct me please?
thanks in advance
- Moved by Richard_BrundrittMicrosoft Employee, Owner Friday, March 09, 2012 3:24 PM (From:Bing Maps: Map Control and Web services Development)
Thursday, December 30, 2010 9:24 PMModerator
What do you mean by the "right" east and west points? A point at longitude -140 is to the east of a point at longitude 150 - no algorithm will correct that!
What server are you using? SQL Server 2008 has no problem with defining polygons that cross the dateline. E.g. POLYGON((150 20, -140 20, -140 60, 150 60, 150 20)) as shown below:
Beginning Spatial with SQL Server http://www.apress.com/book/view/1430218290
- Marked As Answer by Richard_BrundrittMicrosoft Employee, Owner Tuesday, January 18, 2011 1:51 PM
Thursday, February 10, 2011 9:17 AM
Thanks for the reply and sorry for the delay...
The way I solved my issue with antimeridian spanning is using two location rects like so
LocationRect boundsE = new LocationRect(bounds.North, bounds.West, bounds.South, 180.0);
LocationRect boundsW = new LocationRect(bounds.North, -180.0, bounds.South, bounds.East);
which I have seen in http://www.cadmaps.com/gisblog/?cat=10