Are there any good examples for converting the shapefile data to JTS
geometries?  I ran into problems using WSG84 coordinates which don't
map to cartesian coordinates.  I understand that JTS is a cartesian
coordinate library.

~Ben Holland

On Fri, Aug 6, 2010 at 9:44 AM, Jody Garnett <[email protected]> wrote:
> Those were good suggestions.
>
> I was thinking for each country; create a prepared geometry, or that data 
> structure for a point in polygon test, and run through all of the points (or 
> if you are worried load the points into a spatial index and use the polygon 
> extent to pull out a small number to test against).
>
> Jody
>
> On 07/08/2010, at 12:32 AM, [email protected] wrote:
>
>> 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
>
>
> ------------------------------------------------------------------------------
> 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 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

Reply via email to