mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-26 00:02:08 -05:00
8 lines
298 B
Python
8 lines
298 B
Python
|
def mapping_feature(feature):
|
||
|
geom = feature.geometry()
|
||
|
fields = [field.name() for field in feature.fields()]
|
||
|
properties = dict(list(zip(fields, feature.attributes())))
|
||
|
return {'type': 'Feature',
|
||
|
'properties': properties,
|
||
|
'geometry': geom.__geo_interface__}
|