I have this geometry key that looks like this from which I want to create a Geom object so something like this MultiPolygon(((-xx.73833882299999 yy.41161324700006, -xx.73826573899998 yy.41172750400005....)))

"geometry" : {
      "type" : "MultiPolygon",
      "coordinates" : [ [ [ [ -xx.73833882299999, yy.41161324700006 ], [ -xx.73826573899998, yy.41172750400005 ], [ -xx.73841407199996, yy.411798780000034 ], [ -xx.73847373299998, yy.411705506000033 ], [ -xx.73838981999995, yy.41166518500007 ], [ -xx.73840324199995, yy.411644202000044 ], [ -xx.73833882299999, yy.41161324700006 ], [ -xx.73833882299999, yy.41161324700006 ] ] ] ]

Is there a function in Python that helps to do that?


What you have is a geoJSON file. Assuming you want to convert this into a shapefile using python, perhaps this could help https://stackoverflow.com/questions/44049679/geojson-to-shapefile-using-python.

If you have access to ESRI software, there is a tool called json to features which may be of use to you as well.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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