Database Reference
In-Depth Information
8. Export the previous query to a CSV file. In this case, you have to indicate
how the geometric information must be stored in the file; this is done using
the -lco GEOMETRY option:
$ ogr2ogr -t_srs EPSG:4326 -f CSV -lco
GEOMETRY=AS_XY -lco SEPARATOR=TAB
warmest_hs.csv
PG:"dbname='postgis_cookbook' user='me'
password='mypassword'" -sql "SELECT
f.the_geom, f.bright_t31, ac.iso2,
ac.country_name FROM chp01.global_24h as
f JOIN chp01.africa_countries as ac ON
ST_Contains(ac.the_geom,
ST_Transform(f.the_geom, 4326)) ORDER BY
f.bright_t31 DESC LIMIT 100"
Search WWH ::




Custom Search