Closed stephen-lazarionok closed 4 years ago
You can use method shape_to_feature
.
import codecs
import osm2geojson
with codecs.open('file.json', 'r', encoding='utf-8') as data:
json = data.read()
shapes_with_props = osm2geojson.json2shapes(json)
item = shapes_with_props[0]
geojson_feature = osm2geojson.shape_to_feature(item['shape'], item['properties'])
# {type: 'Feature', ...}
Is there any way to convert shapes to geojson. I am looking for a way where I can manipulate with shapes and then create the geojson.