This might be a pretty a pretty simple question, but still in the process of learning about GeoTools – so rather than agonizing, I thought I’d ask…
I have a polygon shapefile that imports nicely into geotools as a FeatureResults containing MultiPolygons (they are counties, so they are irregular polygons). I also have an ArrayList of x and y co-ordinates as double values.
What is the best way of seeing which polygons contain the set of points?
I know that MultiPolygon has < contains(Geometry) >, and that Polygon has < contains(double x, double y) >. What would be the best way for packaging an array of x y double values into a Geometry, or alternatively is there a way to somehow make use of Polygon’s < contains(double x, double y) > method?