Ciao
come sempre la lista va più veloce dei miei test.
Grazie a Paolo, Gino e Diego per i suggerimenti che convergono su:
- ogr2ogr -f “ESRI Shapefile” output.shp PG:“host=xxxx port=xxxx dbname=xxxx user=xxxx password=xxxx” nomelayerpostgis -sql “SELECT campotroppolungo1 AS C1, campotroppolungo2 AS C2 from nomelayerpostgis”
Testato, funzionante e veloce.
- pgsql2shp -f “/path/to/shape” -h localhost -u myuser -P mypasswrord mydb
“SELECT field1 as alias1, the_geom FROM mytable’”
Non testato ma immagino funzioni.
- meglio ancora, definirti un OGR virtual format che puoi riusare anche
successivamente o per vedere direttamente su QGIS la tabella PostGIS
con gli stessi nomi che avresti sullo shapefile (pur rimanendo
invariati sul db), e quindi esportarli con tali alias:
anche questo non testato ma affascinante.
Grazie dell’aiuto.
Rocco