[Qgis-user] wkt

Richard Duivenvoorde rdmailings at duif.net
Fri Oct 27 07:02:23 PDT 2017


On 26-10-17 16:49, Michael.Dodd wrote:
> I have 1000+ geometries as shown below and need to find the area of
> each, some of them have more than one chunk to the polygon. The format
> is not wkt format but is probably convertable.  Is there a way to get
> these into qgis and do the area calculations?
> 
>> {"circles":[],"polygons":[[[61.438,-0.461],[57.491,-9.645],[55.00,-9.689],[54.6983,-11.579],[50.985177,-11.53],[51.06809,-6.56982],[49.0944,-6.56],[50.0914,-1.73],[50.48454,1.076],[52.90801,2.878]]],"rectangles":[]}
> 
>> {"circles":[],"polygons":[],"rectangles":[[[51.0951,0.03457],[51.094,0.033871]]]}

This isn't geojson either, it is just plain json.

See:
https://en.wikipedia.org/wiki/GeoJSON

You would need some javascript (or python) to load such object and then
based on the polygon or rectangle create n FeatureCollection/geojson
object from it (check it here: http://geojson.io).
Note that your polygons do not close (last x,y is not first one), and
your rectangles have only the bottom and top corner. So you need some
coding..

If you save that to file you can just load it into QGIS as vectordata.

Regards,

Richard



More information about the Qgis-user mailing list