Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from shapely.geometry import shape
- from fiona._geometry import GeomBuilder
- def geometry_wkb(wkb_str):
- """
- `wkb_str`: a wkb string
- ex: "01010000001B9FC9FE79F95EC0C501F4FBFE7D4740"
- """
- geom = GeomBuilder().build_wkb(bytearray.fromhex(wkb_str))
- return shape(geom)
Add Comment
Please, Sign In to add comment