Hi,

I am new to GeoTools and spatial systems in general.  I am trying to do
something very specific, and it looks like the GeoTools libraries should be
able to do this.  That said, I have not been able to figure out the exact
steps I need to follow.  I have browsed the documentation and mailing list
archives, as well as the code.

I have a Shapefile created by someone else, using some ESRI tool.  The
shapefile has multiple features, each of which has a multipolygon geometry.

I want to identify if a given latitude/longitude coordinate lies within any
of the features within the shapefile.

So far, I am able to load in the Shape File and iterate through the features
with Feature Iterator.  I tried to do my comparison by creating a Point
through a GeometryFactory from the latitude/longitude values I have, and
then trying:

feature.getDefaultGeometry().contains(thePoint).

However, this is always false.  The lat/long values I have are:

26.49247
-80.47114

Is there some additional step I need to do?  Do these values need to be
converted in some fashion before performing the geometry operation
(contains())?

Please let me know if I should be asking a different question.  I am feeling
my way through this right now.

Any help will be greatly appreciated!

Thanks,

Cliff
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to