worace / geoq

Geospatial Utility Belt
MIT License
72 stars 8 forks source link

Add command for generating "point radius" polygons #14

Open worace opened 6 years ago

worace commented 6 years ago

Something like:

echo 34.0,-118.0 | geoq point-radius 50

Where 50 indicates meters.

And get out a polygon (probably default to GeoJSON) approximating the circle of that radius at that point.

Optionally we could take an argument to specify the number of points used for the circle-ish polygon, but I think for starters it's fine to just pick a number.

Eventually it would be cool to support a general-purpose buffer command for all geometries, but the implementation of that is somewhat complex (JTS version is here for reference) and it doesn't look like there is an existing rust implementation of it yet. So starting with just points seems fine and still useful.