0

I have a set of (lat,lon) coordinates that compose a polygon.

Is there a straightforward method to get an analogous set of coordinates defining a smaller version of the polygon?

For example, given the following picture:

enter image description here

If I am provided with the set of coordinates defining the blue shape, how can I obtain the set of coordinates corresponding to the green one?

  • 1
    What software are you using? – ahmadhanb Nov 12 '18 at 17:29
  • no software, I am implementing a program in Java and I need to define a polygon and obtain its smaller version – João Matos Nov 12 '18 at 17:30
  • If you don't wanna code it yourself, you'll probably want a buffer function, using a negative buffer width. – Jon Nov 12 '18 at 19:14
1

Jts is a geometry library for java. Its geometry class has a buffer function. Here is a description of the api: https://locationtech.github.io/jts/javadoc/org/locationtech/jts/geom/Geometry.html Source code is available, too.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.