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


Mads Skjern
 

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



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