Re: [Geotools-gt2-users] test if lat lon point is inside shapefile attribute geometry

2011-03-14 Thread Alessandro Ferrucci
Thank you Jody that was helpful to know. On Tue, Mar 15, 2011 at 12:34 AM, Jody Garnett wrote: > The link I sent you earlier shows two loops. > > The outer loop goes through one feature collection (in this case the points > you want to check). You may have to reproject them to match up with your

Re: [Geotools-gt2-users] test if lat lon point is inside shapefile attribute geometry

2011-03-14 Thread Jody Garnett
The link I sent you earlier shows two loops. The outer loop goes through one feature collection (in this case the points you want to check). You may have to reproject them to match up with your shapefile as per the email with andrea. The inner loop is done using a query against your shapefile.

Re: [Geotools-gt2-users] test if lat lon point is inside shapefile attribute geometry

2011-03-14 Thread Alessandro Ferrucci
By the way, The shapefile that I am using for the Polygon geometry is a tiger line shapefile. Tiger lines use NAD83 CRS (4269). i have found the following geotools page: http://docs.codehaus.org/display/GEOTDOC/03+CoordinateReferenceSystem Which says that conversion for WGS84 to cartesian is a

Re: [Geotools-gt2-users] test if lat lon point is inside shapefile attribute geometry

2011-03-14 Thread Alessandro Ferrucci
Andrea, thank you for the heads up about Axis order. OK so I think I have the correct implementation of how to do this, but I would like feedback from the community as to whether it's actually correct and any flaws it may have (go easy on me please, I'm a true noobie). Note: Shapefile is in GCS_No

Re: [Geotools-gt2-users] test if lat lon point is inside shapefile attribute geometry

2011-03-14 Thread Andrea Aime
On Mon, Mar 14, 2011 at 1:49 PM, Alessandro Ferrucci wrote: > Thanks very much for the info, I have another question. > > I believe these points were captured with a GPS.  Is the standard GPS > Coordinate projection WGS84? Yep. You still have to beware of axis order though, all shapefiles I ever

Re: [Geotools-gt2-users] test if lat lon point is inside shapefile attribute geometry

2011-03-14 Thread Alessandro Ferrucci
Thanks very much for the info, I have another question. I believe these points were captured with a GPS. Is the standard GPS Coordinate projection WGS84? On Mon, Mar 14, 2011 at 1:13 AM, Michael Bedward wrote: > Hi Alessandro, > > > I am not sure (sorry I'm just learning these things). > > > >

Re: [Geotools-gt2-users] test if lat lon point is inside shapefile attribute geometry

2011-03-13 Thread Michael Bedward
Hi Alessandro, > I am not sure (sorry I'm just learning these things). > > I just have a file with a set of Lat (-90 to 90) and Lon (-180 to 180), does > that help figure that out? No > The only thing I know is that they are coming from the same source as my > shapes.. the shapes use GCS_North_A

Re: [Geotools-gt2-users] test if lat lon point is inside shapefile attribute geometry

2011-03-13 Thread Alessandro Ferrucci
One more thing, the points and shapefiles are guaranteed to be in locations in the U.S. On Sun, Mar 13, 2011 at 11:22 PM, Alessandro Ferrucci < alessandroferru...@gmail.com> wrote: > I am not sure (sorry I'm just learning these things). > > I just have a file with a set of Lat (-90 to 90) and Lon

Re: [Geotools-gt2-users] test if lat lon point is inside shapefile attribute geometry

2011-03-13 Thread Alessandro Ferrucci
I am not sure (sorry I'm just learning these things). I just have a file with a set of Lat (-90 to 90) and Lon (-180 to 180), does that help figure that out? The only thing I know is that they are coming from the same source as my shapes.. the shapes use GCS_North_American_1983 CRS but the points

Re: [Geotools-gt2-users] test if lat lon point is inside shapefile attribute geometry

2011-03-13 Thread Michael Bedward
Hello Alessandro, You don't mention whether or not your test points use the same ellipsoid as your shapes. If you know that they are the same then obviously no re-projection is necessary :) Michael On 14 March 2011 11:55, Alessandro Ferrucci wrote: > Well my question is probably actually simple

Re: [Geotools-gt2-users] test if lat lon point is inside shapefile attribute geometry

2011-03-13 Thread Alessandro Ferrucci
by "transformations" I mean "reprojection" On Sun, Mar 13, 2011 at 8:55 PM, Alessandro Ferrucci < alessandroferru...@gmail.com> wrote: > Well my question is probably actually simpler than joining the Geometries > in the Shapefile, I already have that covered. > > Here's the problem. > > I have 1

Re: [Geotools-gt2-users] test if lat lon point is inside shapefile attribute geometry

2011-03-13 Thread Alessandro Ferrucci
Well my question is probably actually simpler than joining the Geometries in the Shapefile, I already have that covered. Here's the problem. I have 1 Polygon geometry. I have 1 Point created from Lat/Lon. I want to test whether that Point falls within the polygon. Do I have to do any transform

Re: [Geotools-gt2-users] test if lat lon point is inside shapefile attribute geometry

2011-03-13 Thread Jody Garnett
http://docs.codehaus.org/display/GEOTDOC/12+Using+a+Loop+to+Join+FeatureCollections -- Jody Garnett On Monday, 14 March 2011 at 8:30 AM, Alessandro Ferrucci wrote: > Hello, > I have a shapefile that I read using geotools and extract default geometries > for all features in shapefile. > all t

[Geotools-gt2-users] test if lat lon point is inside shapefile attribute geometry

2011-03-13 Thread Alessandro Ferrucci
Hello, I have a shapefile that I read using geotools and extract default geometries for all features in shapefile. all the geometries in the shapefile are polygons. The shapefile is in the GCS_North_American_1983 CRS. Then I have a set of Lat Lon Points. I would like to take those Lat Lon points