Tagged Questions
3
votes
0answers
16 views
What is the correct syntax for using gdal_rasterize with a PostGIS datasource
I have a multipolygon layer in PostGIS and I would like to use gdal_rasterize to generate a raster. I cannot find the correct syntax to specify PostGIS as the data source.
$ gdal_rasterize -a ...
2
votes
1answer
66 views
st_clip and gdal_translate: “Error browsing database for PostGIS Raster properties” - Why?
Im using shell-script, postgis2.0 and gdal for trying to clip raster apart, using an overlapping raster and a the_geom-object. At first I create a view to clip the overlapping part of the raster. It ...
4
votes
1answer
77 views
How to use -lco options in gdal_contour?
I'm trying to create contours from geotiff raster with gdal_contour. My output format is Postgresql and I would like to ovewrite the existing table.
When I do:
gdal_contour -a 1 -f PostgreSQL -i 50 ...
2
votes
0answers
83 views
What means the gdal_translate message: “Too many command options”? [closed]
I have a little question, regarding the gdal_translate-utility:
I want to extract raster-files from database-stored gridfiles using the gdal_translate:
gdal_translate -ot Float32 -of SAGA PG: ...
3
votes
2answers
233 views
Why does Ogr2Ogr Postgres import fail?
I have a lot of S57 files that need to be imported to PostgresDB. The process takes over 2 hours. In order to improve performance, I have tried using PG_USE_COPY to use copy instead of DB inserts. I ...
1
vote
2answers
153 views
How to specify gdal_contour output format as postgresql table?
I want to generate contours with gdal_contour command.
It generates an output as shapefile by default.
I want this utility to output a postgresql (postgis) table.
The documentation says there is a -f ...
3
votes
0answers
183 views
How to save table from PostgreSQL to MapInfo File?
I have two tables:
1 with geometry in WGS
2 with geometry in Local System
I tried this:
ogr2ogr -f "MapInfo File" output2.tab PG:"host=localhost user=postgres password=123456 dbname=postgis" -sql ...
7
votes
2answers
273 views
How to catch PostgreSQL/PostGIS errors in GDAL/OGR Python bindings?
Is it possible to catch PostgreSQL output error messages in OGR after a query has failed?
For example
conn.ExecuteSQL('SELECT * FROM non_existing_table;')
In Postgres this returns an error ...
4
votes
1answer
2k views
How to import a raster into PostGIS?
I'm trying to follow the instructions here to load a raster into a PostGIS database:
python raster2pgsql.py -s 4269 -I -r *.tif -F myschema.demelevation -o elev.sql
I understand that I replace * ...
5
votes
2answers
1k views
GDAL Python bindings not picking up OGR PostgreSQL driver
I have a windows server (Microsoft Windows Server 2003) with:
Python 2.7,
PostgreSQL 9.04-1,
GDAL 1.8.1 (installed from the windows installer
(gdal-18-1500-core.msi) hosted at
...