[postgis-users] Mapserver connection to Postgis Raster
Jorge Arévalo
jorge.arevalo at deimos-space.com
Mon Jun 6 07:37:32 PDT 2011
Hi,
No, the driver doesn't need an empty entry in raster_columns table. It
only checks for raster_columns' existence. This is one of the things
I'm going to delete from the driver's code.
Virginia, raster_columns table is used in PostGIS Raster extension, to
store metadata, but the driver doesn't use it. I don't think that's
the problem. Could you send me the SQL code for your raster table? The
code generated by raster2pgsql script.
Best regards,
Jorge
On Mon, Jun 6, 2011 at 4:14 PM, Virginia Maffei <vmaffei at gmail.com> wrote:
> Sorry but i didn't understand very well. In the raster_columns table i have
> an entry for this table.
> I dont now if i'm answering you question.
> Virginia
>
> On Mon, Jun 6, 2011 at 10:54 AM, Pierre Racine <Pierre.Racine at sbf.ulaval.ca>
> wrote:
>>
>> Would it be possible that the driver needs a missing entry in the
>> raster_columns table?
>>
>> > -----Original Message-----
>> > From: postgis-users-bounces at postgis.refractions.net
>> > [mailto:postgis-users-
>> > bounces at postgis.refractions.net] On Behalf Of Jorge Arévalo
>> > Sent: Monday, June 06, 2011 4:01 AM
>> > To: PostGIS Users Discussion
>> > Subject: Re: [postgis-users] Mapserver connection to Postgis Raster
>> >
>> > Hi,
>> >
>> > Did you test using single quotes surrounding at least the table name?
>> > The blank spaces may cause problems.
>> >
>> > Best regards,
>> > Jorge
>> >
>> > On Sun, Jun 5, 2011 at 11:03 PM, Virginia Maffei <vmaffei at gmail.com>
>> > wrote:
>> > > Hi, I installed again de postgis 2.0 and now i could load al the .sql
>> > > with the makepostgisdb.bat that de windows version brings. The only
>> > > thing is that i had to first create de DB and then in a separate .bat
>> > > run the .sql
>> > load.
>> > > I installed gdal 1.8 and also have de gdal 1.8 in the mapserver (ms4w
>> > > 3.0.2) installation, but i cant connect with the data base i'm trying
>> > > to run a gdal_translate or gdal_info and it doesnt work. I created a
>> > > new data base having as template the one loaded with the postgis 2.0
>> > > This is the error that it shows:
>> > > C:\ms4w\tools\gdal-ogr>gdal_translate PG:"dbname=raster user=postgres
>> > > table=Hume dadDeExtincion mode=2"
>> > > C:\TSIG\capas\sql2\HumedadDeExtincion.tif
>> > > ERROR 1: Error browsing database for PostGIS Raster properties
>> > > GDALOpen failed - 1 Error browsing database for PostGIS Raster
>> > > properties
>> > >
>> > > Any way...i will post this problem in another thread because the
>> > > subject is different.
>> > > regards,
>> > > Virginia
>> > >
>> > >
>> > > 2011/6/3 Jorge Arévalo <jorge.arevalo at deimos-space.com>
>> > >>
>> > >> [SP] Hola Virginia. Realmente el único español, que yo sepa, soy yo,
>> > >> así que si no te importa, voy a responder a tu pregunta en inglés
>> > >>
>> > >> [EN] Hi Virginia, AFAIK, I'm the only Spanish on the list. So, I'm
>> > >> going to answer your question in english.
>> > >>
>> > >> Are you sure you loaded all the needed sql files? These are
>> > >> postgis.sql, spatial_ref_sys.sql and rtpostgis.sql
>> > >>
>> > >> Best regards,
>> > >> Jorge
>> > >>
>> > >> On Thu, Jun 2, 2011 at 11:36 PM, Virginia Maffei <vmaffei at gmail.com>
>> > >> wrote:
>> > >> > Hola! estoy intentando cargar manualmente el raster support y estoy
>> > >> > ejecutando el rtpostgissql que trae el postgis2.0 Pero al
>> > >> > ejecutarlo me tira que no existe la funcion box2d(raster) Alguna
>> > >> > idea de que puede estar pasando?
>> > >> > Gracias!
>> > >> > PD: Escribí en español porque me pareció ver que son de españa y yo
>> > >> > en realidad hablo en español.
>> > >> > saludos!
>> > >> > Virginia
>> > >> >
>> > >> >
>> > >> > On Thu, Jun 2, 2011 at 11:16 AM, Virginia Maffei
>> > >> > <vmaffei at gmail.com>
>> > >> > wrote:
>> > >> >>
>> > >> >> Thank you!! I will try that installation Virginia
>> > >> >>
>> > >> >>
>> > >> >> 2011/6/2 Jorge Arévalo <jorge.arevalo at deimos-space.com>
>> > >> >>>
>> > >> >>> On Thu, Jun 2, 2011 at 3:25 PM, Virginia Maffei
>> > >> >>> <vmaffei at gmail.com>
>> > >> >>> wrote:
>> > >> >>> > Thank you for your quick response!
>> > >> >>> > I have another question: can i install postgis 2.0 in windows?
>> > >> >>> > where
>> > >> >>> > can I
>> > >> >>> > download it?
>> > >> >>> >
>> > >> >>> >
>> > >> >>> > Virginia
>> > >> >>> >
>> > >> >>>
>> > >> >>> Yes, you can. Follow this post's instructions:
>> > >> >>>
>> > >> >>>
>> > >> >>> http://gis4free.wordpress.com/2011/03/10/how-to-install-and-
>> > configure-postgis-raster-on-windows/
>> > >> >>>
>> > >> >>> Best regards,
>> > >> >>> Jorge
>> > >> >>>
>> > >> >>>
>> > >> >>> >
>> > >> >>> > 2011/6/2 Jorge Arévalo <jorge.arevalo at deimos-space.com>
>> > >> >>> >>
>> > >> >>> >> Hi,
>> > >> >>> >>
>> > >> >>> >> The mode=2 parameter is only valid with the last version of
>> > >> >>> >> GDAL
>> > >> >>> >> (1.8.0). So, as Regina said, you need that version to make it
>> > >> >>> >> work
>> > >> >>> >> properly. More accurately:
>> > >> >>> >>
>> > >> >>> >> - With a GDAL version down to 1.7.1, you can't make it work in
>> > >> >>> >> any
>> > >> >>> >> way. No driver.
>> > >> >>> >>
>> > >> >>> >> - With a GDAL version between 1.7.1 and 1.7.3, both included,
>> > >> >>> >> you
>> > >> >>> >> can
>> > >> >>> >> use the old version of the driver, thought to work with the
>> > >> >>> >> old
>> > >> >>> >> wktraster extension, now abandoned. And it was buggy. Not
>> > >> >>> >> recommended.
>> > >> >>> >> Neither GDAL 1.7.x nor wktraster.
>> > >> >>> >>
>> > >> >>> >> - With GDAL version up to 1.8.0, you can use the last version
>> > >> >>> >> of
>> > >> >>> >> GDAL
>> > >> >>> >> PostGIS Raster driver, and you'll need PostGIS 2.0, that
>> > >> >>> >> includes
>> > >> >>> >> PostGIS Raster extension. Additionally, as Regina said, those
>> > >> >>> >> days
>> > >> >>> >> we're working on the driver, and all the improvements will be
>> > >> >>> >> included
>> > >> >>> >> in GDAL 1.8.x
>> > >> >>> >>
>> > >> >>> >> So, summarizing: You need PostGIS 2.0 plus GDAL 1.8.0 to make
>> > >> >>> >> it
>> > >> >>> >> work.
>> > >> >>> >>
>> > >> >>> >> Further information on the driver:
>> > >> >>> >> http://trac.osgeo.org/gdal/wiki/frmts_wtkraster.html
>> > >> >>> >>
>> > >> >>> >> Best regards,
>> > >> >>> >> Jorge
>> > >> >>> >>
>> > >> >>> >> On Thu, Jun 2, 2011 at 6:53 AM, Paragon Corporation
>> > >> >>> >> <lr at pcorp.us>
>> > >> >>> >> wrote:
>> > >> >>> >> > Virginia,
>> > >> >>> >> >
>> > >> >>> >> > I think you are missing a mode='2' in your connection.
>> > >> >>> >> > That was
>> > >> >>> >> > a
>> > >> >>> >> > new
>> > >> >>> >> > requirement that was added for GDAL 1.8+
>> > >> >>> >> >
>> > >> >>> >> > Try putting that in. I think the speed on the loading still
>> > >> >>> >> > needs
>> > >> >>> >> > quite
>> > >> >>> >> > a
>> > >> >>> >> > bit of work though last I tried. The speed issues will
>> > >> >>> >> > hopefully
>> > >> >>> >> > be
>> > >> >>> >> > resolved before 2.0 release.
>> > >> >>> >> >
>> > >> >>> >> > Thanks,
>> > >> >>> >> > Regina
>> > >> >>> >> > http://www.postgis.us
>> > >> >>> >> >
>> > >> >>> >> >
>> > >> >>> >> > ________________________________
>> > >> >>> >> > From: postgis-users-bounces at postgis.refractions.net
>> > >> >>> >> > [mailto:postgis-users-bounces at postgis.refractions.net] On
>> > >> >>> >> > Behalf
>> > >> >>> >> > Of
>> > >> >>> >> > Virginia
>> > >> >>> >> > Maffei
>> > >> >>> >> > Sent: Wednesday, June 01, 2011 8:00 PM
>> > >> >>> >> > To: postgis-users at postgis.refractions.net
>> > >> >>> >> > Subject: [postgis-users] Mapserver connection to Postgis
>> > >> >>> >> > Raster
>> > >> >>> >> >
>> > >> >>> >> > Hi, i'm new at this and i'm trying to connect to postgis
>> > >> >>> >> > raster
>> > >> >>> >> > in
>> > >> >>> >> > the
>> > >> >>> >> > mapfile.
>> > >> >>> >> > I loaded a tif file into postgis raster database with the
>> > >> >>> >> > raster2pgsql.py
>> > >> >>> >> > script. It created a table with 2 fields: rid and rast.
>> > >> >>> >> > In the mapfile i added the connection like it specifies in
>> > >> >>> >> > the
>> > >> >>> >> > postgis
>> > >> >>> >> > raster FAQ but it doesn't displays anything.
>> > >> >>> >> > This is my mapfile:
>> > >> >>> >> > MAP
>> > >> >>> >> > IMAGETYPE PNG24
>> > >> >>> >> > EXTENT 366582.2901411663 6127927.100382689
>> > >> >>> >> > 857582.2901411663
>> > >> >>> >> > 6670927.100382689
>> > >> >>> >> > SIZE 491 543
>> > >> >>> >> > SHAPEPATH "../data"
>> > >> >>> >> > LAYER # MODIS raster layer begins here
>> > >> >>> >> > NAME modis
>> > >> >>> >> > TYPE RASTER
>> > >> >>> >> > STATUS ON
>> > >> >>> >> > DATA "PG:host=localhost port=5432 dbname='postgis'
>> > >> >>> >> > user='postgres'
>> > >> >>> >> > password='postgres' schema='public'
>> > >> >>> >> > table='HumedadDeExtincion'"
>> > >> >>> >> > PROCESSING "NODATA=0"
>> > >> >>> >> > PROCESSING "SCALE=AUTO"
>> > >> >>> >> > PROCESSING "SCALE_BUCKETS=201"
>> > >> >>> >> > PROCESSING "BANDS=1"
>> > >> >>> >> > OFFSITE 71 74 65
>> > >> >>> >> > CLASS
>> > >> >>> >> > NAME "red"
>> > >> >>> >> > EXPRESSION ([pixel] < 10)
>> > >> >>> >> > COLOR 255 0 0
>> > >> >>> >> > END
>> > >> >>> >> > CLASS
>> > >> >>> >> > NAME "green"
>> > >> >>> >> > EXPRESSION ([pixel] >= 10 AND [pixel] < 15000 )
>> > >> >>> >> > COLOR 0 255 0
>> > >> >>> >> > END
>> > >> >>> >> > CLASS
>> > >> >>> >> > NAME "blue"
>> > >> >>> >> > EXPRESSION ([pixel] >= 15000 )
>> > >> >>> >> > COLOR 0 255 0
>> > >> >>> >> > END
>> > >> >>> >> > END # MODIS raster layer ends here
>> > >> >>> >> >
>> > >> >>> >> > # End of LAYER DEFINITIONS -------------------------------
>> > >> >>> >> > END # All map files must come to an end just as all other
>> > >> >>> >> > things
>> > >> >>> >> > must
>> > >> >>> >> > come
>> > >> >>> >> > to...
>> > >> >>> >> >
>> > >> >>> >> > I have gdal 1.6 , postgis 1.5 and ms4w with mapserver 5.6.6
>> > >> >>> >> > We cant see the tiff file on the browser, it only appears a
>> > >> >>> >> > white
>> > >> >>> >> > image.
>> > >> >>> >> > We did try with the tif without the database connection an
>> > >> >>> >> > it
>> > >> >>> >> > works.
>> > >> >>> >> > Could you help us?
>> > >> >>> >> > Thank you
>> > >> >>> >> >
>> > >> >>> >> > _______________________________________________
>> > >> >>> >> > postgis-users mailing list
>> > >> >>> >> > postgis-users at postgis.refractions.net
>> > >> >>> >> >
>> > >> >>> >> > http://postgis.refractions.net/mailman/listinfo/postgis-users
>> > >> >>> >> >
>> > >> >>> >> >
>> > >> >>> >>
>> > >> >>> >>
>> > >> >>> >>
>> > >> >>> >> --
>> > >> >>> >> 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
>> > >> >>> >> _______________________________________________
>> > >> >>> >> postgis-users mailing list
>> > >> >>> >> postgis-users at postgis.refractions.net
>> > >> >>> >> http://postgis.refractions.net/mailman/listinfo/postgis-users
>> > >> >>> >
>> > >> >>> >
>> > >> >>> > _______________________________________________
>> > >> >>> > postgis-users mailing list
>> > >> >>> > postgis-users at postgis.refractions.net
>> > >> >>> > http://postgis.refractions.net/mailman/listinfo/postgis-users
>> > >> >>> >
>> > >> >>> >
>> > >> >>>
>> > >> >>>
>> > >> >>>
>> > >> >>> --
>> > >> >>> 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
>> > >> >>> _______________________________________________
>> > >> >>> postgis-users mailing list
>> > >> >>> postgis-users at postgis.refractions.net
>> > >> >>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>> > >> >>
>> > >> >
>> > >> >
>> > >> > _______________________________________________
>> > >> > postgis-users mailing list
>> > >> > postgis-users at postgis.refractions.net
>> > >> > http://postgis.refractions.net/mailman/listinfo/postgis-users
>> > >> >
>> > >> >
>> > >>
>> > >>
>> > >>
>> > >> --
>> > >> 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
>> > >> _______________________________________________
>> > >> postgis-users mailing list
>> > >> postgis-users at postgis.refractions.net
>> > >> http://postgis.refractions.net/mailman/listinfo/postgis-users
>> > >
>> > >
>> > > _______________________________________________
>> > > postgis-users mailing list
>> > > postgis-users at postgis.refractions.net
>> > > http://postgis.refractions.net/mailman/listinfo/postgis-users
>> > >
>> > >
>> >
>> >
>> >
>> > --
>> > 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
>> > _______________________________________________
>> > postgis-users mailing list
>> > postgis-users at postgis.refractions.net
>> > http://postgis.refractions.net/mailman/listinfo/postgis-users
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at postgis.refractions.net
>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>
--
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
More information about the postgis-users
mailing list