[postgis-devel] [PostGIS] #498: Gdal export of some files gives blank image
PostGIS
trac at osgeo.org
Tue Apr 13 20:53:00 PDT 2010
#498: Gdal export of some files gives blank image
-----------------------+----------------------------------------------------
Reporter: robe | Owner: pracine
Type: defect | Status: new
Priority: medium | Milestone: WKTRaster 0.1.6
Component: wktraster | Version: trunk
Keywords: |
-----------------------+----------------------------------------------------
I think my mapserver problems may be related to my export issues, and I'm
not quite sure where the problem lies.
I tried this example from
http://trac.osgeo.org/gdal/wiki/frmts_wtkraster.html
{{{
C:\python25\python gdal2wktraster.py -r small_world.tif -t
ch13.small_world -l 1 -k 40x20 -o small_world.sql -s 4326
}}}
Then tried to export it with
{{{
gdal_translate -of PNG PG:"host=localhost dbname=
'wktraster_postgis15' user='postgres' password='whatever' schema='ch13'
table=sm
all_world" C:\small_world.png
gdal_translate -of JPEG -band 1 PG:"host=localhost dbname=
'wktraster_postgis15' user='postgres' password='whatever' schema='ch13'
table=sm
all_world" C:\small_world_bw.jpg
}}}
And those both work fine, but if I try to do the same thing with the
PostGIS elepant, I just get a blank or black screen output.
{{{
C:\python25\python gdal2wktraster.py -r pele.png -t ch13.pele2 -l 1 -k
40x20 -o pele2.sql
psql -h localhost -d wktraster_postgis15 -U postgres -f pele2.sql
gdal_translate -of PNG PG:"host=localhost dbname=
'wktraster_postgis15' user='postgres' password='whatever' schema='ch13'
table=pele2" C:\pelefromdb.png
}}}
Just gives me a black box or blank image of the right dimensions.
I had the same issue with a georefenced MrSID file I had converted to
georeferenced JPEG and then loaded in, but I thought maybe it was my
conversion statement.
I tried on an ArcView Raster file (BIL) and exported that and that seemed
to work fine.
So now I'm beginning to thinks its either the pixel types or original file
type. Quick scan of pixel values in db look right to me well they are
definitely all differnt numbers.
Attached is the PostGIS elephant to test with.
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/498>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-devel
mailing list