Re: Does fio (Fiona CLI) work with a WKT string?


Sean Gillies
 

Hi Mads,

I'm sorry to report that the fio commands work on features and collections, not on geometries, and understand GeoJSON only.


On Thu, Sep 8, 2022 at 10:17 AM Mads Skjern <mrvelle@...> wrote:
I need to make simple operaitons/calculations on WKT on command line. I get a WKT string for a single polygon from jq, and I want to get the bounding box of this polygon. 

$ cat details.json | jq -r '. | .geom[0]'
POLYGON ((121 7076, 126 7083, 115 7092, 109 7086, 121 7076)) 


I want to get the boundring rectangle of that polygon, preferably also in WKT notation. Is that possible? I was hoping for something like:

$ cat details.json | jq -r '. | .geom[0]' | fio bounds # does not work





--
Sean Gillies

Join main@fiona.groups.io to automatically receive all group messages.