Re: Spatial relationships between geometries
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 (http://sourceforge.net/projects/jts-topo-suite) 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 (http://sourceforge.net/projects/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).
Subject
Views
Written By
Posted
4902
January 18, 2006 04:31AM
2951
January 18, 2006 11:20AM
Re: Spatial relationships between geometries
3291
February 02, 2006 04:36PM
3019
August 24, 2006 10:54PM
2914
August 30, 2006 10:22PM
2818
September 04, 2006 09:52PM
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.