Hello everyone,<br> I want to thank everyone who helped me set up my GRASS mapserver.<br> Just wanted to express my gratitude to all.<br> These were all the steps i followed. i would be happy if this could be of some help to others.<br> <br> <DEFANGED_meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <DEFANGED_meta name="Generator" content="Kate, the KDE Advanced Text Editor"> <pre>Mapserver-4.6.2 Installation With GRASS-6.0.1 Support On Mandriva 2006 Linux OS ******************************************************************************* Prior to installing GD library, Install its dependencies. freetype-2.1.4.tar.gz libpng-1.2.8-config.tar.gz libjpeg62-devel-6b (rpm) libiconv-1.9.1.tar.gz 1.Install gd-2.0.33.tar.gz tar xvfz gd-2.0.33.tar.gz cd gd-2.0.33 ./configure --with-png=/usr/local/lib --with-freetype=/usr/local/lib --with-jpeg=/usr/lib --with-libiconv-prefix=/usrlocal/lib make su ma!
ke
install su cp -f /usr/include/gd.h /usr/local/lib/ 2.Install PROJ4 tar xvfz proj-4.4.9.tar.gz cd proj-4.4.9 ./configure make su make install 3.Install GDAL/OGR *without* GRASS support Disable the hdf4 support while configuring gdal-1.3.1 because the netcdf formats of hdf4 package in gdal-1.3.1 conflicts with the seperate netcdf installed. tar xvfz gdal-1.3.1.tar.gz cd gdal-1.3.1 ./configure --without-hdf4 make su make install Check: gdalinfo --version GDAL 1.3.1.0, released 2005/10/04 gdal-config --version 1.3.1 gdal_translate --version GDAL 1.3.1.0, released 2005/10/04 4. Install GRASS-6.0.1 Prior to installing grass-6.0.1 on mandriva 2006 check/install its dependencies. *flex *yacc *libtiff *Postgres *OpenGl : Mesa-devel-3.4-13.i386 Then, tar xvfz grass-6.0.1.tar.gz cd grass-6.0.1 ./configure --prefix=/home/siddhesh/ --bindir=/home/siddhesh/bin
-with-postgres-includes=/usr/include/pgsql --without-odbc --without-fftw make make install 5. Install GDAL/OGR GRASS plugin The plugin needs the GRASS libraries to be linked to /usr/local/lib Do this with something like " cd /usr/local/lib ; ln -s /home/siddhesh/grass-6.0.0/lib/*.so . " Then run ldconfig after linking. Make sure the grass library path(/home/siddhesh/grass-6.0.1/lib) is added to the LD_LIBRARY_PATH enviroment variable before running the ./configure tar xvfz gdal-grass-1.3.1.1.tar.gz cd gdal-grass-1.3.1 ./configure --with-gdal=/usr/local/bin/gdal-config --with-grass=/home/siddhesh/grass-6.0.0 make su make install * Check if GDAL finds the plugin: gdal_translate --formats | grep -i grass GRASS (ro): GRASS Database Rasters (5.7+) * Check if the GRASS libs are found by the plugin. All libraries should be found (maybe you forgot to run 'ldconfig' !
if
you didn't install from RPMs?): ldd /usr/lib/gdalplugins/grass_GRASS.so ldd /usr/lib/gdalplugins/ogr_GRASS.so 6. Install Mapserver with GRASS support tar xvfz mapserver-4.6.2 ./configure --with-proj --with-ogr --with-gdal=/usr/local/bin/gdal-config --with-gd=/usr/local/lib --with-png=/usr/local/lib make su make install 7. Copy the following executables from /home/siddhesh/mapserver-4.6.2/ to /var/www/cgi-bin/ (Requires root access) mapserv legend shp2img shp2pdf shptreetst sortshp test.cgi scalebar shp2mysql.pl shptree shptreevis squidGuard.cgi tile4ms check: /var/www/cgi-bin/mapserv -v MapServer version 4.6.2 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER INPUT=EPPL7 INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE 8. You have to run the ldc!
onfig as
root. Just run the following command (as root) /sbin/ldconfig /usr/local/lib -v Mapserver should work now. Remember: When you stop your server you may have to redo this. 9. Setting up the Demo Mapserver as shown on the following website: http://grass.itc.it/start.html * In your sytem, locate the file .grassrc6 containing GISDBASE: /home/siddhesh/grass60/GrassData60 LOCATION_NAME: spearfish60 MAPSET: PERMANENT MONITOR: x1 GRASS_GUI: tcltk *Determine $DOCUMENT_ROOT of your server (here: /var/www/html/ ) *Copy .grassrc6 to the $DOCUMENT_ROOT of your server. This is done as follows: cp -f /home/siddhesh/.grassrc6 /var/www/html/ *Create a link to your GRASS database as follows. cd /var/www/ ln -s /home/siddhesh/grass60/GrassData60 GrassData60 *Create a tmp directory in /var/www/html/ cd /var/www/html/ mkdir tmp chmod 777 tmp *Download the sample server (270kb)
http://grass.itc.it/spearfish/grass5_mapserver.tar.gz Un-tar it tar xvfz grass5_mapserver.tar.gz cd ./grass5_mapserver (requires root access) cp -rf map-script /var/www/ cp -rf spearfish /var/www/html/ cp -f spearfish.html /var/www/html/ cp -f start.html /var/www/html/ In the start.html make the following changes using a HTML editor (Quanta) Change the URL to the cgi-bin inside: http://localhost/cgi-bin/mapserv?map=/usr/local/httpd/map-script/mapserver.map This is done as follows: <a href=http://localhost/cgi-bin/mapserv?map=/var/www/map-script/mapserver.map> Start SPEARFISH mapserver</a> where localhost is your hostname. In /var/www/map-script/mapserver.map made the following changes: * Set temp data absolute path IMAGEPATH /var/www/html/tmp/ * Define OFFSET in RGB ex For LAYER dem in mapserver.map on line78 made the following changes: OFFSI!
TE 255 0
255 Similarly did it for LAYER roads in mapserver.map on line103 OFFSITE 255 0 0 *Modified the variable DATA to point to data LAYER NAME goa-map256out TYPE RASTER STATUS ON DATA "/var/www/GrassData60/spearfish60/PERMANENT/cellhd/soils"<br><br><br><br><br><br>Regards<br>Siddhesh<br> <br></pre><br> <br> <br> <br> <br> <br> <p>
                <hr size=1> Yahoo! Mail<br>
<a href="http://pa.yahoo.com/*http://us.rd.yahoo.com/evt=38867/*http://photomail.mail.yahoo.com">Use Photomail</a> to share photos without annoying attachments.