Thank you Jody that was helpful to know.
On Tue, Mar 15, 2011 at 12:34 AM, Jody Garnett <[email protected]>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
> shapefile as per the email with andrea.
>
> The inner loop is done using a query against your shapefile. You construct
> the query using your point. The result is a feature collection (perhaps
> empty!) of the polygon(s) that contain the point.
>
> You may want to adjust the query so that it says "contains" rather than
> intersects.
>
> --
> 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 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 and check if they fall within any
> of the feature geometries in the shapefile.
>
> anyone have example of this?
> I'm pretty sure I have to convert Lat Lon to JTS geom Point object?
>
> Given that fact I've read the shapefile without doing any explicit
> reprojection, do I have to reproject lat lon point to same CRS as is
> declared in shapefile?
>
> thanks a lot
>
> --
> Signed,
> Alessandro Ferrucci
>
> ------------------------------------------------------------------------------
> Colocation vs. Managed Hosting
> A question and answer guide to determining the best fit
> for your organization - today and in the future.
> http://p.sf.net/sfu/internap-sfd2d
> _______________________________________________
> Geotools-gt2-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>
>
>
--
Signed,
Alessandro Ferrucci
------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users