MySQL Forums
Forum List  »  GIS

Re: Spatial relationships between geometries
Posted by: Peter Yuill
Date: February 02, 2006 04:36PM

Most spatial databases have a concept of primary (index based) and secondary (non index based) filters for spatial queries. MySQL has just implemented the primary side at this stage, so you will need to do the secondary filtering in code. Java offers you a couple of good options.
If you have it all working except for the secondary filtering your best bet is probably to use JTS ( to create a geometry for the zone and intersect it with geometries you select from the database using your MBR query. JTS has rigorous implementations of all common spatial predicates, including intersects. It also has IO classes to construct geometry from WKT.
The other good option is to use Geotools ( It offers a vast array of spatial functionality including rendering, reprojection, meta data and of course data access to a wide range of sources including MySQL (with secondary filtering built in).

Options: ReplyQuote

Written By
Re: Spatial relationships between geometries
February 02, 2006 04:36PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.