[postgis-users] problem with raster2pgsql

Cheryl cheryl.bckl at gmail.com
Wed Mar 7 13:17:05 PST 2012


Hi bborie,

Thankyou for you reply. I ended up solving the problem myself. It was a pixel issue. The given pixels in the command line of raster2pgsql didnt correlate with the raster image. The raster image was too large for the given "-t 100x100". I had to adjust the raster2pgsql command line by editing the "-t 100x100" to a larger value of "-t 300x300".

The images now look as would be expected.

raster2pgsql -c -s 4326 -I -C ./Hillshade.tif -F -t 100x100 ${TABLE} | psql --quiet -h 127.0.0.1 -U admin -d ${DB}

Thankyou
Cheryl


Am 07.03.12 17:14, schrieb Bborie Park:
> Hey Cheryl,
>
> If possible, could you provide a sample raster image so that we can
> duplicate what you're seeing.  Since the loader is working for your
> hillshade images but not for your aspect or slope images, my guess is
> that there is some key difference.
>
> -bborie
>
> On Wed, Mar 7, 2012 at 3:03 AM, cheryl buckley<cheryl.bckl at gmail.com>  wrote:
>> Hi all,
>>
>> I have a problem in which I think I need some clarification on.
>> I have made use of Gdal to produce hill shaded, aspect and slope
>> images. I wanted to store these raster images into postgis database by
>> making use of raster2pgsql. I have managed to get the hill shade image
>> to store into the database and when I then view it in QuantumGIS by
>> connecting to the postgis database it works and the image looks as
>> expected. But when I store the aspect or slope images to the database
>> using raster2pgsql and view it from QuantumGIS the images come out
>> faulty (they just look plain (flat) with speckles on). When I produce
>> the aspect and slope images using gdal and then viewing them in QGIS
>> without storing it to the database first the images look great and as
>> expected. It is when I first store them using raster2pgsql that the
>> images are faulty.
>>
>> Perhaps im suppose to change something in my command line in the
>> raster2postgis, but I simply just cant figure where the problem lies.
>>
>> Perhaps someone can give me a hint where im going wrong?
>>
>> This is the raster2postgis command line i used:
>>
>> raster2pgsql -c -s 4326 -I -C ./Hillshade.tif -F -t 100x100 ${TABLE} |
>> psql --quiet -h 127.0.0.1 -U admin -d ${DB}
>>
>> Thanks in Advance
>> Cheryl
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at postgis.refractions.net
>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>




More information about the postgis-users mailing list