[postgis-users] WKTRaster problems on Mac

Pierre Racine Pierre.Racine at sbf.ulaval.ca
Fri Jan 21 06:44:44 PST 2011


I see that this raster contains 32BF. One problem we have right now with the query I suggest is that ST_DumpAsPolygons will convert all your float value to int. We are looking for a solution to this as the problem comes from GDALPolygonize which do not supports float rasters.

Pierre

From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Pierre Racine
Sent: 21 janvier 2011 09:38
To: PostGIS Users Discussion
Subject: Re: [postgis-users] WKTRaster problems on Mac

Ken,

I tried the .img file you sent me and everything seems ok.

What did you use to produce this image? I suspect the image is well stored but the renderer you are using have some problems.

To display images I use OpenJump and so a query like:

SELECT ST_AsBinary((gv).geom), (gv).val
FROM (SELECT ST_DumpAsPolygons(rast) gv FROM x01) foo

to the database.

Pierre

From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Ken Nussear
Sent: 20 janvier 2011 12:41
To: postgis-users at postgis.refractions.net
Subject: [postgis-users] WKTRaster problems on Mac

Hi all.

I've been working with the gdal2wktraster.py script trying to load some rasters to see it things work, and I'm having some difficulty.
The example from the tutorial using the utml.tif tile seems to work fine, but every other raster I've tried gives strange results.
Some show as all one value, and others appear to have irregular patches of values in the block sizes imported.

I have tried tif, png, and img files some come in as pictured below, and some just come in with single values (e.g. 8 for all cells). Some have ridiculous numbers (e.g. 2.8026e-45)
Some examples attached.

I'm using a mac with postgis from William Kyngesburye @ kyngchaos.com<http://kyngchaos.com>

postgresql version 9.0.2-1
postgis version 1.5.2-2
WKTRaster 0.1.6d r5997 for Postgres 9.0

commands used:


/usr/local/pgsql/bin/gdal2wktraster.py -r  D2BDRK_SLP_SAAT.img -t d2bdrk -k 32x32 -o d2bdrk.sql -s 26911 -I -M

/usr/local/pgsql/bin/psql -d brdgisR -f d2bdrk.sql -U postgres -w

I wonder if you have any advice on what might be going wrong?

Thanks

Ken


[cid:image001.png at 01CBB94F.D5246C00]

[cid:image002.png at 01CBB94F.D5246C00]

[cid:image003.png at 01CBB94F.D5246C00]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20110121/b40fe8c7/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 58894 bytes
Desc: image001.png
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20110121/b40fe8c7/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 195897 bytes
Desc: image002.png
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20110121/b40fe8c7/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 19950 bytes
Desc: image003.png
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20110121/b40fe8c7/attachment-0002.png>


More information about the postgis-users mailing list