Opened 7 years ago

Closed 7 years ago

#6711 closed enhancement (wontfix)

XLSX: Support GEOMETRY creation option

Reported by: Mike Taves Owned by: warmerdam
Priority: low Milestone:
Component: OGR_SF Version: unspecified
Severity: normal Keywords:
Cc:

Description

This feature request is for the XLSX driver to add geometry information similar to the CSV driver with types specified by (e.g.) OGRCSVGeometryFormat in ogr_csv.h.

This way, a user could (e.g.) convert Locations.kmz to Locations.xlsx file with X and Y columns using:

ogr2ogr -f XLSX -lco GEOMETRY=AS_XY Locations.xlsx Locations.kmz

On an implementation side-note, perhaps a higher-level approach for this type of layer creation option should be shared by multiple OGR drivers, including CSV, XLSX, ODS and potentially other creation-enabled geometry-less drivers.

Change History (1)

comment:1 by Even Rouault, 7 years ago

Resolution: wontfix
Status: newclosed
Version: unspecified

You can use the Spatialite ST_X() and ST_Y() functions to do that:

ogr2ogr -f XLSX test.xlsx test.kmz  -sql "SELECT ST_X(geometry) AS X, ST_Y(geometry) AS Y, * FROM test" -dialect sqlite
Note: See TracTickets for help on using tickets.