We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent be45c52 commit 4d47d41Copy full SHA for 4d47d41
1 file changed
pygeoapi/formatter/csv_.py
@@ -96,7 +96,8 @@ def _write_from_geojson(
96
LOGGER.debug('Including point geometry')
97
if data['features'][0]['geometry']['type'] == 'Point':
98
LOGGER.debug('point geometry detected, adding x,y columns')
99
- fields.extend(['x', 'y'])
+ fields.insert(0, 'x')
100
+ fields.insert(1, 'y')
101
is_point = True
102
else:
103
LOGGER.debug('not a point geometry, adding wkt column')
@@ -126,7 +127,8 @@ def _add_feature(
126
127
try:
128
if self.geom:
129
if is_point:
- [fp['x'], fp['y']] = feature['geometry']['coordinates']
130
+ fp['x'] = feature['geometry']['coordinates'][0]
131
+ fp['y'] = feature['geometry']['coordinates'][1]
132
133
geom = geojson_to_geom(feature['geometry'])
134
fp['wkt'] = geom.wkt
0 commit comments