Oracle may have an SDO_NN (nearest neighbor) type call. I'm not sure about SQL 
Server. MG doesn't have a closest spatial operator, that would be a good 
wishlist item.

Dave

From: [email protected] 
[mailto:[email protected]] On Behalf Of Berdel, Brian
Sent: Wednesday, June 17, 2009 6:09 PM
To: 'MapGuide Users Mail List'
Subject: [mapguide-users] RE: Spatial Query

Thanks for the reply, I will try that approach and see how it turns out.  It 
does seem like it may be pretty taxing and slow with a lot of points to keep 
looping different circles around them (I forgot to explain there would be a 
lot).  Is there anything in the API for "closest" ? Just to get the ID of the 
segment?  I actually don't need to select them.   I was also going to check 
into SQL spatial to see if there is any way to do it as well.  Thanks

Brian


________________________________
From: [email protected] 
[mailto:[email protected]] On Behalf Of Dave Wilson
Sent: Wednesday, June 17, 2009 4:54 PM
To: MapGuide Users Mail List
Subject: [mapguide-users] RE: Spatial Query

You could do a spatial query using a circle in a loop continually increasing 
the radius each time until you get a result. Setting the initial radius and the 
increments of the circle probably depends on the coordinate system of the data 
although this is similar to the logic in the selection for a click select in 
the AJAX Viewer so you could start with that.

Dave

From: [email protected] 
[mailto:[email protected]] On Behalf Of Berdel, Brian
Sent: Wednesday, June 17, 2009 2:17 PM
To: MapGuide Users Mail List
Subject: [mapguide-users] Spatial Query

What is the best approach to performing a spatial query as such that a road 
segment closest to a point is selected?  Any examples out there?  Not sure if 
OpenLayers or Mapguide Api would be best, but appreciate any suggestions.

Thanks!

Brian


________________________________
Important notice to recipients:
Copies of documents that may be relied upon by you are limited to the printed 
copies (also known as 'hard copies') that are signed and sealed by the Engineer 
and/or Land Surveyor. Files in electronic formats, or other types of 
information furnished by the Engineer and/or Land Surveyor to you such as text, 
data or graphics are for your convenience only. Any conclusions or information 
obtained or derived from such electronic files will be at the user's sole risk. 
When transferring documents in electronic formats, the Engineer and/or Land 
Surveyor makes no representation as to long-term compatibility, usability, or 
readability of the documents resulting from the use of software application 
packages, operating systems or computer hardware differing from those used by 
McMahon Associates, Inc. at the beginning of the project.

________________________________
Important notice to recipients:
Copies of documents that may be relied upon by you are limited to the printed 
copies (also known as 'hard copies') that are signed and sealed by the Engineer 
and/or Land Surveyor. Files in electronic formats, or other types of 
information furnished by the Engineer and/or Land Surveyor to you such as text, 
data or graphics are for your convenience only. Any conclusions or information 
obtained or derived from such electronic files will be at the user's sole risk. 
When transferring documents in electronic formats, the Engineer and/or Land 
Surveyor makes no representation as to long-term compatibility, usability, or 
readability of the documents resulting from the use of software application 
packages, operating systems or computer hardware differing from those used by 
McMahon Associates, Inc. at the beginning of the project.
_______________________________________________
mapguide-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapguide-users

Reply via email to