[mapserver-users] GRASS GIS layers -help!
Daniel Morissette
dmorissette at mapgears.com
Fri Jan 22 08:45:19 PST 2010
Gary,
With POINT/LINE/POLYGON layer types, MapServer tries to open the DATA as
shapefiles by default, that's why you get that error message. Assuming
your GDAL/OGR is built with GRASS support, then you should use
"CONNECTIONTYPE OGR" in your layer definition, and specify the path to
the dataset in the CONNECTION parameter.
More info on CONNECTIONTYPE OGR is available at:
http://mapserver.org/input/vector/ogr.html
Daniel
Gazz1982 wrote:
> I am using GRASS GIS with gdal and ogr support:
>
> mapserv -v
> MapServer version 5.4.2 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP
> OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV
> SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER
> SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS
> SUPPORTS=GEOS INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE
>
> Mapserver works with no problems with shapefiles
>
> I tried to link to a GRASS layer using the following layer definition and it
> returned this error:
> msDrawMap(): Image handling error. Failed to draw layer named 'ex_area'.
> msShapefileOpen(): Unable to access file.
> (/var/www/grassdata/Keinsmerburg2/site_data/ex_area/1_polygon)
> msShapefileOpen(): Unable to access file.
> (/var/www/grassdata/Keinsmerburg2/site_data/ex_area/1_polygon)
>
> File permissions are set to www-data and are set to create and delete.
>
> Any ideas? I would be very grateful
> Gary
>
> LAYER
> NAME 'ex_area'
> TYPE POLYGON
> DUMP true
> TEMPLATE fooOnlyForWMSGetFeatureInfo
> EXTENT -30.311890 -1.325000 68.311890 54.325000
> DATA '/var/www/grassdata/Keinsmerburg2/site_data/ex_area/1_polygon'
> METADATA
> 'ows_title' 'ex_area'
> END
> STATUS OFF
> TRANSPARENCY 100
> PROJECTION
> 'proj=sterea'
> 'lat_0=52.15616055555555'
> 'lon_0=5.38763888888889'
> 'k=0.9999079'
> 'x_0=155000'
> 'y_0=463000'
> 'ellps=bessel'
> 'units=m'
> 'no_defs'
> END
> CLASS
> NAME 'ex_area'
> STYLE
> SYMBOL 0
> SIZE 7.0
> OUTLINECOLOR 0 0 0
> COLOR 64 113 156
> END
> END
> END
--
Daniel Morissette
http://www.mapgears.com/
More information about the MapServer-users
mailing list