BoundingBox object/polgon map search

Topics: SharpMap v0.9 / v1.x
Mar 23, 2009 at 6:43 PM
Will a bounding box object perform an intersection query when it is points form a polygon (like a star type shape)?  Does it simply form a box based on the bounds of polygon?

My results lead me to believe the latter is true.  If this is the case,  how can I perform an intersection query with a "non-standard" shape as mentioned above?

Any input would be greatly appreciated.


Mar 23, 2009 at 6:49 PM
Hi seevo, It depends on the provider - the shapefile provider only tests bounding boxes. You can filter the results using NTS see 
hth jd
Mar 23, 2009 at 7:40 PM


Thanks - I saw the article you listed and figured I would see it again - thanks.  It however uses a shape file - I am using attempting to query a standard SQL Server table with longs and lats stored as doubles.

The process basically goes as follows:

  • A base recordset is pulled from the SQL table based on other non-geo filter criteria.
  • The resulting recordset is loaded into a GeometryFeatureProvider object
  • A bounding box object is built based on a user-drawn polygon
  • Bounding box/GeometryFeatureProvider used to execute a intersection query

Does the article you indicated still apply in this scenario?



Mar 23, 2009 at 8:00 PM
the second method should work.... hth jd
Mar 23, 2009 at 8:02 PM
I suspected.  Thanks for your time - again!