1

I have a parcel which I would like to load into QGIS. The county's GIS website is not a standard Arc REST format, so I am struggling with the formatting. It uses "mapgeo" and I am not sure how to import the data into QGIS.

Here is the link https://carrollcova.mapgeo.io/api/ui/datasets/properties/77-A-64

I think this is a .json format, but I cannot figure out how to import it to QGIS.

I have tried converting it into a .csv file, but I do not know which fields I should use for lat/long since there are so many options.

I have tried using https://ogre.adc4gis.com/ to convert it to a geojson, but it could not read the file.

1 Answer 1

2

This indeed was not a standard geojson.
However the coordinates and attributes were easy to reconfigure to geojson format.

you can use this short script to load this data into qgis or save to a file if you enter a valid output folder on your machine.

from requests import get
import json

url = 'https://carrollcova.mapgeo.io/api/ui/datasets/properties/77-A-64'
r = get(url)
obj = r.json()

base_object = {'type': "FeatureCollection",'features':[]}
for g in obj["geometries"]:
    feature = {'type' : 'Feature','properties' : {},'geometry' : {}}
    feature['geometry'] = g['geometry']
    feature['properties'] = obj["data"]
    base_object["features"].append(feature)

# Load to QGIS or comment out
iface.addVectorLayer(json.dumps(base_object), 'New Layer', 'ogr')


# Save to the path specified by filename
filname = "path/save/this.geosjon"
with open(filname, 'w') as file:
     file.write(json.dumps(base_object))

what came up when loading this data

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.