I've been spending some days trying to find the best way to do a "rigid translate" of a polygon in a certain direction and distance, without much luck. To provide an example, consider translate like moving a polygon on 30 degrees south, for 500 meters.
Is there any API in Java GeoTools that you have used successfully to do such moving of a polygon?
If not for the polygon as a whole in one operation, I can do a single point translation for each point of the polygon, if no better solution can be found. I don't need to do this real time, so I have processing time to spend to do this.
The approach I'm following so far is of calculating the shifting on the single point as for this link to the geodetic calculator
In the specific the part called:
Generate location away from a point
`GeodeticCalculator calc = new GeodeticCalculator(); // mind, this is lon/lat calc.setStartingGeographicPoint(45.4644, 9.1908); calc.setDirection(90 /* azimuth */, 200 /* distance */); Point2D dest = calc.getDestinationGeographicPoint(); System.out.println("Longitude: " + dest.getX() + " Latitude: " + dest.getY());`