I am using Java Geotools library for check if a POINT(...) is contained in a POLYGON(...).
I have done it with:
Geometry sPG = reader.read(wktStartPoint); //startpointgeometry
Geometry sEG = reader.read(wktEndPoint);
if(wktLayerGeo.contains(sPG) || wktLayerGeo.contains(sEG)){
// do something
}
But now I have to set a tolerance: I would check if a point is contained in the polygon with a tolerance distance of 50 km for example.
Can I do it with GeoTools?
Thank you