MCPcopy Create free account
hub / github.com/OSGeo/PROJ / geojson2geom_array

Function geojson2geom_array

docs/plot/plot.py:110–113  ·  view source on GitHub ↗

Read GeoJSON file, return array of geometries.

(file)

Source from the content-addressed store, hash-verified

108
109
110def geojson2geom_array(file):
111 """Read GeoJSON file, return array of geometries."""
112 features = geojson.loads(Path(file).read_text())["features"]
113 return np.fromiter((shape(feat["geometry"]) for feat in features), object)
114
115
116def project(coordinates, proj_string, in_radians=False):

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected