How to create GeometryCollection from geojson with python shapely?
问题 I want to calculate areas of geometries and some of these geometries can be geometry collections. But I can't do this because shapely doesn't create geometry collection from geojson. Here is the sample code: import sys import shapely from shapely.geometry import shape print sys.version print shapely.__version__ shp = shape({ "type" : "GeometryCollection", "geometries" : [ { "type" : "MultiPolygon", "coordinates" : [ [ [ [ -176.392059198913, -44.2871679740063 ], [ -176.392051742896, -44