so I'm trying to rename PostgreSQL/PostGIS columns when importing from WFS using
The post here covers how to achieve this when importing from a Shapefile, using the
-sql option like this:
-sql "SELECT col_1 AS BetterName, col_2 AS ImprovedName FROM YourShapefile"
However, as I'm importing from WFS, I'm trying to do something like this:
ogr2ogr -overwrite -f PostgreSQL PG:"dbname=YourDB host=YourHost user=User password=Password active_schema=Schema" -nlt POLYGON -nln TableName "WFS:[WFS_URL_HERE]" -a_srs EPSG:4230 -sql "SELECT shape.area AS shape_area, shape.len AS shape_len FROM [What goes here?]"
How does the
-sql option work in this particular use case? I have tried adding the WFS URL after the
FROM clause, but this did not work.
Does anyone have any experience of this, is it even possible?