gdal_translate -of GTiff "PG: dbname=test3 host=fox user=test
password=*** port=5432 schema=public
table=spain_images" /home/paolo/Desktop/spain.tif
ERROR 1: Can't get georeference coordinates from database
ord=test port=5432 schema=public
table=spain_images" /home/paolo/Scrivania/prov.ERROR 1: Sorry, but
couldn't create the structure to read the raster on memory,
aborting.
GDALOpen failed - 1
Sorry, but couldn't create the structure to read the raster
on memory, aborting.
Any hint?
All the best.
--
http://www.faunalia.it/pc
_______________________________________________
postgis-users mailing list
postgi...@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users
Hi Paolo,
This is a problem with GDAL driver, not a PostGIS one. I need to know 2 things:
- What version of GDAL are you using? (gdalinfo --version)
- Did you specify the srid when you loaded the raster files? Using -s
option in raster2pgsql.py (or gdal2wktraster.py, in case of and old
version of PostGIS Raster)
Best regards,
--
Jorge Arévalo
Internet & Mobilty Division, DEIMOS
jorge....@deimos-space.com
http://mobility.grupodeimos.com/
http://gis4free.wordpress.com
http://geohash.org/ezjqgrgzz0g
Strange, it is working on a db created about a week ago, not on the more
recent ones. Same gdal.
> - What version of GDAL are you using? (gdalinfo --version)
1.7.2 from debian experimental.
> - Did you specify the srid when you loaded the raster files? Using -s
> option in raster2pgsql.py
Yes; I tried with 2 different EPSG, no difference.
Thanks a lot.
Could you told me the PostGIS Raster versions used to create both dbs?
If you can't, at least the commands used to create the db that is
causing you problems
>> - What version of GDAL are you using? (gdalinfo --version)
>
> 1.7.2 from debian experimental.
>
This version of GDAL uses an old version of the GDAL driver. I made
some improvements a couple of months ago. Using the last GDAL version
from trunk may help. But let's see what's happening with the db,
before doing this
>> - Did you specify the srid when you loaded the raster files? Using -s
>> option in raster2pgsql.py
>
> Yes; I tried with 2 different EPSG, no difference.
>
The SRID for Spain TIFF files (if you're using these
http://dl.dropbox.com/u/6599273/srtm_spain.zip) is 4326.
> Thanks a lot.
Thanks to you for providing me feedback :-). I'd like to help users as
much as I can. And to learn, of course.
Best regards,
--
Jorge Arévalo
Internet & Mobilty Division, DEIMOS
jorge....@deimos-space.com
http://mobility.grupodeimos.com/
http://gis4free.wordpress.com
http://geohash.org/ezjqgrgzz0g
> Could you told me the PostGIS Raster versions used to create both dbs?
I compile from svn. The two versions are from 23 december (working) and
today (not working)
> If you can't, at least the commands used to create the db that is
> causing you problems
I create the db with the usual sequence:
createdb yourdatabase
psql -d yourdatabase -f postgis/postgis.sql
psql -d yourdatabase -f doc/postgis_comments.sql
psql -d yourdatabase -f spatial_ref_sys.sql
psql -d yourdatabase -f raster/rt_pg/rtpostgis.sql
psql -d yourdatabase -f doc/raster_comments.sql
then
python raster2pgsql.py -r w001001.adf -t dtm_rt -l 1 -k 64x64 -o
dtm_rt.sql -s 3003 -I -M
(same with other rasters).
Thanks a lot.
_______________________________________________
So, correct me if I'm wrong...
You compiled PostGIS from trunk and did the same sequence
createdb yourdatabase
psql -d yourdatabase -f postgis/postgis.sql
psql -d yourdatabase -f doc/postgis_comments.sql
psql -d yourdatabase -f spatial_ref_sys.sql
psql -d yourdatabase -f raster/rt_pg/rtpostgis.sql
psql -d yourdatabase -f doc/raster_comments.sql
python raster2pgsql.py -r w001001.adf -t dtm_rt -l 1 -k 64x64 -o
dtm_rt.sql -s 3003 -I -M
(I suppose after that you did psql -d yourdatabase -f drm_rt.sql)
You did it on December 23rd and today. And with the same version of
GDAL, you tried to transform the PostGIS Raster in a TIFF file. With
the db created on 23rd it worked, but with the db created today, it
doesn't.
Could you send me the original files you loaded in PostGIS?
Best regards,
--
Jorge Arévalo
Internet & Mobilty Division, DEIMOS
jorge....@deimos-space.com
http://mobility.grupodeimos.com/
http://gis4free.wordpress.com
http://geohash.org/ezjqgrgzz0g
> So, correct me if I'm wrong...
> (I suppose after that you did psql -d yourdatabase -f drm_rt.sql)
Correct.
> You did it on December 23rd and today. And with the same version of
> GDAL, you tried to transform the PostGIS Raster in a TIFF file. With
> the db created on 23rd it worked, but with the db created today, it
> doesn't.
>
> Could you send me the original files you loaded in PostGIS?
I tried with several files, including the sample ones (utm.tif).
All the best.
Ok. I'll check the Spaing GeoTIFF files with GDAL 1.7.2 to reproduce
your problem. Could you send me one of your raster files?
I've created a new GDAL ticket, to manage this problem:
http://trac.osgeo.org/gdal/ticket/3892
Best regards,
--
Jorge Arévalo
Internet & Mobilty Division, DEIMOS
jorge....@deimos-space.com
http://mobility.grupodeimos.com/
http://gis4free.wordpress.com
http://geohash.org/ezjqgrgzz0g
> I've created a new GDAL ticket, to manage this problem:
> http://trac.osgeo.org/gdal/ticket/3892
Thanks a lot.
Thanks to you, again.
Seems to work for me. Could you please make a test with the last GDAL
version from trunk? Or at least with this one
http://download.osgeo.org/gdal/gdal-1.8.0beta2.tar.gz
Best regards,
--
Jorge Arévalo
Internet & Mobilty Division, DEIMOS
jorge....@deimos-space.com
http://mobility.grupodeimos.com/
http://gis4free.wordpress.com
http://geohash.org/ezjqgrgzz0g