I assume your geometries are stored in shape files. Possibility 1, using SQL) Use a spatial sql extender like postgis, import your shape files into sql tables and create a query using a sql statement with spatial predicates (st_contains, st_intersects)
Possibility 2, using JAVA) Read your polygons from a shape file. Read your point from the shape file and create ONE Multpoint JTS geometry. Intersect the Multipoint geometry with each polygon. The result of the intersection is a Multipoint geometry containing all points within the polygon. Hope this helps Quoting Andreas Schildbach <[email protected]>: > Hi there, > > I have got 300.000 Geo-Coordinates (European Public Transport Stops) and > like to determine for each of them to which country they belong - > preferably in Java code. Due to the sheer number of coordinates, I think > I cannot use one of the available web services (request limits). > > I was pointed to GT2, but am unable to find a simple example to build > on. I found TM_WORLD_BORDERS-0.2 data which seems to contain the country > shapes I need. > > Can you give me a pointer to some code? > > Best regards, > > Andreas > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by > > Make an app they can't live without > Enter the BlackBerry Developer Challenge > http://p.sf.net/sfu/RIM-dev2dev > _______________________________________________ > Geotools-gt2-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users > ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. ------------------------------------------------------------------------------ This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev _______________________________________________ Geotools-gt2-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
