I am having trouble creating a layer with geom type as geometry collection. Thus I am unable to output to a shapefile. I have attached code below. dstLayer is null. This does not happen if geom type is polygon or multilinestring or any other.
spatialReference = osr.SpatialReference()
spatialReference.SetWellKnownGeogCS('WGS84')
driver = ogr.GetDriverByName("ESRI Shapefile")
dstPath = os.path.join("common-border", "border.shp")
dstFile = driver.CreateDataSource(dstPath)
dstLayer = dstFile.CreateLayer("layer", spatialReference, ogr.wkbGeometryCollection)
Any help will be appreciated.
thanks