shapely.from_wkb#
- from_wkb(geometry, on_invalid='raise', **kwargs)#
Creates geometries from the Well-Known Binary (WKB) representation.
The Well-Known Binary format is defined in the OGC Simple Features Specification for SQL.
- Parameters:
- geometrystr or array_like
The WKB byte object(s) to convert.
- on_invalid{“raise”, “warn”, “ignore”}, default “raise”
raise: an exception will be raised if a WKB input geometry is invalid.
warn: a warning will be raised and invalid WKB geometries will be returned as
None
.ignore: invalid WKB geometries will be returned as
None
without a warning.
- **kwargs
See NumPy ufunc docs for other keyword arguments.
Examples
>>> from_wkb(b'\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf0?\x00\x00\x00\x00\x00\x00\xf0?') <POINT (1 1)>