Scale and draw a polygon from latitude and longitude

58 Views Asked by At

I have a set of coordinates of some fields that I can easily draw on a map. Here's an example:

45.60859921    19.24758575
45.60869489    19.24816738
45.60538637    19.24872261
45.60535008    19.24841258
45.60662288    19.24802522
45.60660895    19.24791747

What I would like to do is to create an image representation of that field, using GD, like the image below, just without the background. Input would be size of a square image in pixels and field's coordinates, and code would fit the field polygon in that square with some padding.

These polygons are small, couple of hectares at most, so precise projection is not important. It's the shape in a box that I'm after.

enter image description here

0

There are 0 best solutions below