read_geojson
builtin
¶
read_geojson(path, *, nodata=None, length_unit=None)
Reads a GeoJSON file as a PointSet or Polylines.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str or Path
|
A feature collection, a feature or a geometry. |
required |
nodata
|
sequence of float or str
|
Property values read as null, as in |
None
|
length_unit
|
str
|
The unit of the coordinates, for files in a projected CRS. |
None
|
Returns:
| Type | Description |
|---|---|
PointSet or Polylines
|
Points and multipoints give a PointSet, a multipoint repeating its
properties per point. Lines and polygons give Polylines, polygon rings
as closed parts without the repeated closing vertex and a null geometry
as a feature without parts. Positions without z get z = 0. Properties
become columns in file order: numbers float64, booleans bool, the rest
text. The CRS is the one a |
Used in