[postgis-users] PostGIS - Simple Raster Point Query

Duncan Golicher dgolicher at gmail.com
Sat Dec 8 17:53:38 PST 2012


Offhand and without going into more detail I think I can see the
problem. You seem on the face of it to be importing a non
georeferenced image file. This would explain why your at_value queries
don't work. You need to georeference the imagge to a CRS first and
trun it into a something like a geotiff. I take it you come from a
data base background rather than GIS.

All the best,

Duncan


> raster2pgsql -b 1 -t 1200x1200 -C -I -M -s 2193 -R /mnt/nfs/data/nzdem3.img
>> nzdem3-raster-C-I-M-s_2193. >
> is the command I ran for this. (Of course I imported the .sql file into
> PostGIS with psql -f ...
>
> Tim-Hinnerk Heuer
>
> Twitter: @geekdenz
> Blog: http://www.thheuer.com
>
>
>
> On 9 December 2012 01:00, Pierre Racine <Pierre.Racine at sbf.ulaval.ca> wrote:
>>
>> Could you do this:
>>
>> SELECT (ST_Metadata(rast)).* FROM nzdem3;
>>
>> Pierre
>>
>> > -----Original Message-----
>> > From: postgis-users-bounces at lists.osgeo.org [mailto:postgis-users-
>> > bounces at lists.osgeo.org] On Behalf Of Tim-Hinnerk Heuer
>> > Sent: Saturday, December 08, 2012 6:57 AM
>> > To: PostGIS Users Discussion
>> > Subject: Re: [postgis-users] PostGIS - Simple Raster Point Query
>> >
>> > Thanks Pierre for your quick answer, however it didn't work :-(. Also
>> > tried
>> > reversing the coordinates to no success. The raster is tiled already. Is
>> > there
>> > another way maybe?
>> >
>> > Thanks, TIm
>> >
>> > Tim-Hinnerk Heuer
>> >
>> > Twitter: @geekdenz
>> >
>> > Blog: http://www.thheuer.com <http://www.thheuer.com/>
>> >
>> >
>> >
>> > On 9 December 2012 00:49, Pierre Racine <Pierre.Racine at sbf.ulaval.ca>
>> > wrote:
>> >
>> >
>> >       select st_value(rast,ST_SetSRID(ST_Point(1821416, 5649720), 2193))
>> > from nzdem3
>> >
>>
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at lists.osgeo.org
>> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
>
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
>



-- 
Dr Duncan Golicher
Investigador Titular,
El Colegio de la Frontera Sur, Chiapas,Mexico
Mexico tel +52 1 967 137 94 20
Skype name duncangolicher

Publications: http://www.mendeley.com/profiles/duncan-golicher

Senior lecturer, Bournemouth University, UK
Centre for Conservation Ecology & Environmental Change
School of Applied Sciences
Christchurch House rm C218a
Bournemouth University
Fern Barrow
Poole (Dorset) BH12 5BB UK
Tel. +44 (0)1202 961682

For list of publications see Researcher ID:
http://www.researcherid.com/rid/B-4240-2009

dgolicher at bournemouth.ac.uk
dgoliche at ecosur.mx

Researcher ID:
http://www.researcherid.com/rid/B-4240-2009


More information about the postgis-users mailing list