I am trying to let mapserver 3.6.5 read grass raster files. For this I compiled gdal 1.1.8 with grass option (libgrass5 1.0.0) and recompiled mapserver.
Desesparately, Mapserver is unable to display grass raster files and keeps on telling me :
msDrawRaster(): Image handling error. Unrecognized or unsupported image format
Does anyone had the same problem?
Christian
I had this problem too, but it had always something to do with my compiler setup, mostly from using older versions of GDAL lying around. I'm displaying GRASS with MapServer without problems now (works very fast too). I'm running MapServer 3.7, but 3.6.5 should run OK too.
Jan
Christian Blumer wrote:
I am trying to let mapserver 3.6.5 read grass raster files. For this I compiled gdal 1.1.8 with grass option (libgrass5 1.0.0) and recompiled mapserver.
Desesparately, Mapserver is unable to display grass raster files and keeps on telling me :
msDrawRaster(): Image handling error. Unrecognized or unsupported image format
Does anyone had the same problem?
Christian
Thanks, but I found another problem
when testing gdalinfo on a grass dataset I got the following error
ERROR 1: /usr/lib/libgdal.1.1.so: undefined symbol: pj_get_def
stange..strange
----- Original Message -----
From: "Frank Warmerdam" <warmerdam@pobox.com>
To: "Christian Blumer" <christianblumer@yahoo.fr>
Sent: Thursday, May 08, 2003 3:03 PM
Subject: Re: [GRASSLIST:6206] Grass format in mapserver
Christian Blumer wrote:
> I am trying to let mapserver 3.6.5 read grass raster files. For this I
> compiled gdal 1.1.8 with grass option (libgrass5 1.0.0) and recompiled
> mapserver.
> Desesparately, Mapserver is unable to display grass raster files and
> keeps on telling me :
> msDrawRaster(): Image handling error. Unrecognized or unsupported image
> format
> Does anyone had the same problem?
> ChristianChristian,
What are you using as the filename for the layer from GRASS to
display? I would suggest you use a complete path to the cell file in
the cellhd directory to select the cell for your layer. See:http://www.remotesensing.org/gdal/frmt_grass.html
Also, be sure you are using the right libgdal and verify that libgrass
is working with GDAL utilities. Use gdalinfo on a cell and use
"gdalinfo --formats" to verify that GRASS is now listed.Best regards,
--
---------------------------------------+----------------------------------
----
I set the clouds in motion - turn up | Frank Warmerdam,
warmerdam@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
Fine.Reinstalling PROJ4 removes the error with gdal.
But I still can load Grass rasters in mapserver.
Christian
----- Original Message -----
From: "Frank Warmerdam" <warmerdam@pobox.com>
To: "Christian Blumer" <christianblumer@yahoo.fr>
Sent: Thursday, May 08, 2003 3:33 PM
Subject: Re: [GRASSLIST:6213] Re: Grass format in mapserver
Christian Blumer wrote:
> Thanks, but I found another problem
> when testing gdalinfo on a grass dataset I got the following error
> ERROR 1: /usr/lib/libgdal.1.1.so: undefined symbol: pj_get_def
> stange..strangeChristian,
This is normally not a fatal error even though it looks like it is.
However, I would encourage you to download, build and install PROJ.4
from source. See http://www.remotesensing.org/proj. In the next
release of GDAL this error message will be supressed.Best regards,
--
---------------------------------------+----------------------------------
----
I set the clouds in motion - turn up | Frank Warmerdam,
warmerdam@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
gdal alone seems to work fine with libgrass.
Doing gdalinfo --formats shows grass format accessibility
Doing gdalinfo /home/blumer/GRASSDATA/global/PERMANENT/cellhd/nations
displays the content without errors
What do you mean by verifying I am getting the right libgdal?
Cheers,Christian
----- Original Message -----
From: "Frank Warmerdam" <warmerdam@pobox.com>
To: "Christian Blumer" <christianblumer@yahoo.fr>
Sent: Thursday, May 08, 2003 4:28 PM
Subject: Re: [GRASSLIST:6215] Re: Grass format in mapserver
Christian Blumer wrote:
> Fine.Reinstalling PROJ4 removes the error with gdal.
> But I still can load Grass rasters in mapserver.
> ChristianChristian,
I presume you mean cannot. I don't recall your reporting the results
from any of the steps I suggested (report from "gdalinfo --formats", the
check to verify you are getting the right libgdal, and whether gdalinfo
works on the full cell file path outside of mapserver or grass).Frankly the software works just fine, but it can be a bear to build and
install it right, and to use it properly. If you want help debugging
your problem you should go out of your way to try everything based on the
information available, and to provide detailed explanations of your
configuration and what you have tried when asking for help.Best regards,
--
---------------------------------------+----------------------------------
----
I set the clouds in motion - turn up | Frank Warmerdam,
warmerdam@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
I just got it working myself a couple days ago. I had to put a .grassrc5 into the Document_Root location as defined in the httpd.conf file (e.g. /usr/local/apache2/htdocs). Also, the LAYER object DATA element needs to reference the raster from the cellhd directory (e.g. /data/grass/location/mapset/cellhd/mymap).
Hope this helps.
-Matt
(RedHat8.0, Apache2.0, Mapserver 3.6.4, Php4.2.3)
Matt Doggett
Spatial Climate Analysis Service
Oregon State University
316 Strand Ag Hall
Corvallis, OR 97331
(541)737-9153
mdoggett@coas.oregonstate.edu
-----Original Message-----
From: owner-GRASSLIST@baylor.edu [mailto:owner-GRASSLIST@baylor.edu] On Behalf Of Christian Blumer
Sent: Thursday, May 08, 2003 2:57 AM
To: GRASSLIST@baylor.edu
Subject: [GRASSLIST:6206] Grass format in mapserver
I am trying to let mapserver 3.6.5 read grass raster files. For this I compiled gdal 1.1.8 with grass option (libgrass5 1.0.0) and recompiled mapserver.
Desesparately, Mapserver is unable to display grass raster files and keeps on telling me :
msDrawRaster(): Image handling error. Unrecognized or unsupported image format
Does anyone had the same problem?
Christian
Thanks a lot for your help you guys.
I finally found what was wrong.
I created the home directory of the apache user and put there all grass
data. Setting up the correct permissions made the thing work.
A bit tricky...
Christian
----- Original Message -----
From: "Frank Warmerdam" <warmerdam@pobox.com>
To: "Christian Blumer" <christianblumer@yahoo.fr>
Sent: Friday, May 09, 2003 8:32 AM
Subject: Re: [GRASSLIST:6216] Re: Grass format in mapserver
Christian Blumer wrote:
> Thanks, I start to understand a bit better.
> I indeed locate several libgdal.1.1.so files. However doing ldd on
gdalinfo
> or on mapserv shows that they points to the correct libgdal. Renaming
this
> one makes mapserv to fail.
> Runing shp2img with my grass.map I am trying to use creates the correct
> out.png image I want to see in mapserver window...
> what else can I do?Christian,
Hmm. That is interesting. Note that ldd run "as you" may give different
results than the shared library that would be used by mapserv when run
as "nobody" by the web server. However, your problem might also relate
to permissions on the GRASS files, or the lack of a .grassrc for the
account under which cgi-bin executables run. As suggested earlier today
on
on the grass list, try copying your .grassrc (.grassrc5?) to the home
directory of the nobody user.Best regards,
--
---------------------------------------+----------------------------------
----
I set the clouds in motion - turn up | Frank Warmerdam,
warmerdam@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
On Tuesday 13 May 2003 05:41 pm, Christian Blumer wrote:
Thanks a lot for your help you guys.
I finally found what was wrong.
I created the home directory of the apache user and put there all grass
data. Setting up the correct permissions made the thing work.
A bit tricky...
Mapserver -> gdal -> libgrass -> G_gisinit_2() -> G__mapset_permissions()
which checks if process is mapset owner with write permissions.
Radim