[postgis-users] Error in raster import with WKTRaster

Mathieu Basille basille at ase-research.org
Mon Feb 14 11:19:27 PST 2011


Dear Jorge,

Seems to work for me. I'm not sure if I did it correctly, here is what I
did:

1) download the raster2pgsql.py file at
http://trac.osgeo.org/postgis/browser/trunk/raster/scripts/python/raster2pgsql.py?rev=6815

2) place it in /usr/lib/postgresql/8.4/bin/ for convenience (this is
where shp2pgsql lives) and create a link in /usr/bin/

3) convert my GeoTiff again:
raster2pgsql -r RoadDensity_2002_2006_CV_UTM19_25m.tif -t
roaddensity_2002_2006_cv_utm19_25m -s 26919 -k 50x50 -I >
RoadDensity_2002_2006_CV_UTM19_25m.sql

I noticed that I had to use the -t option now (it was absent in my
gdal2raster.py loader).

4) load it in the DB as usual, using the postgres user:
psql -f RoadDensity_2002_2006_CV_UTM19_25m.sql geodb

And it proceeded without any error or warnings. I haven't tested it
thoroughly though, but it seems to work fine now!

Thanks a lot for the correction!
Mathieu.


Le 2011-02-14 07:20, Jorge Arévalo a écrit :
> 2011/2/14 Jorge Arévalo <jorge.arevalo at deimos-space.com>:
>> 2011/2/12 Mathieu Basille <basille at ase-research.org>:
>>> Dear Jorge,
>>>
>>> Thx for this. Shall I do anything about it? I uploaded the problematic
>>> raster for Pierre here:
>>>
>>> http://ase-research.org/tmp/postgis/
>>>
>>> Pierre, are you working on this?
>>>
>>> Sorry if I'm a bit confused, I'm not quite sure what's the best to do as I'm
>>> not familiar with the PostGIS Raster organisation...
>>> And I don't want to add more work for the people involved in PostGIS Raster
>>> than required.
>>>
>>> All the best,
>>> Mathieu.
>>>
>>>
>>>
>>
>> Hi Mathieu,
>>
>> I think is enough. The loader should know how to deal with that.
>>
>> About PostGIS Raster, basically there's a roadmap
>> (http://trac.osgeo.org/postgis/wiki/WKTRaster/PlanningAndFunding) and
>> a list of known bugs and new required features
>> (http://trac.osgeo.org/postgis/report/17).
>>
>> So, if you found a new problem (like your case) or a lack of
>> something, you can use the list to ask for it, and a new ticket will
>> be created when needed (like your case, again).
>>
>> Apart from this, the only thing you need is patience :-)
>>
>> Thanks again for reporting this, and best regards,
>>
>> --
>> Jorge Arévalo
>> Internet & Mobilty Division, DEIMOS
>> jorge.arevalo at deimos-space.com
>> http://es.linkedin.com/in/jorgearevalo80
>> http://mobility.grupodeimos.com/
>> http://gis4free.wordpress.com
>> http://geohash.org/ezjqgrgzz0g
>>
> 
> 
> Hello again,
> 
> I think the loader problem is solved in r6815. Mathieu, could you
> please update your working copy of PostGIS? You don't need to rebuild.
> Just execute the loader again, and test the generated SQL, please.
> 
> Best regards,
> 

-- 

~$ whoami
Mathieu Basille, Post-Doc

~$ locate
Laboratoire d'Écologie Comportementale et de Conservation de la Faune
+ Centre d'Étude de la Forêt
Département de Biologie
Université Laval, Québec

~$ info
http://ase-research.org/basille

~$ fortune
``If you can't win by reason, go for volume.''
Calvin, by Bill Watterson.



More information about the postgis-users mailing list