[Mapserver-users] Drawing ADF Files with Mapserver
TMitchell at lignum.com
Mon May 3 22:48:18 EDT 2004
> I am attempting to render a directory of adf files as a layer within my
> mapfile. Forgive my ignorance, I am totally unfamiliar with this sort of
> thing, especially the ADF files.
You are probably dealing with ArcInfo coverages, which are a collection of
*.adf files in folders. You will probably also need to specify a layer
number for the type of feature you what from that coverage. I agree with
Daniel, grab the latest version of the mapserver binary you can get and a
copy of the gdal/ogr distribution for your platform. Use "ogrinfo" and
the path to the folder. You will get a list of "layers" in that folder,
for example, I have a coverage called biogeo5 and can use ogrinfo to
interogate it thusly:
$ ogrinfo /cygdrive/e/data/spatial/regional/msrm/ecology/biogeo5/
Had to open data source read-only.
INFO: Open of `/cygdrive/e/data/spatial/regional/msrm/ecology/biogeo5/'
using driver `AVCBin' successful.
1: ARC (Line String)
2: CNT (Point)
3: LAB (Point)
4: PAL (Polygon)
There are 4 layers. To use these layer numbers in Mapserver, you will
need to use layer num - 1. For example, if you just want the line strings
of the qbec coverage you will need to append append the layer num (-1) to
the connection string. I see that you were wanting polygons, 4: PAL
(Polygon) so use the layer thusly:
CONNECTION "<full path to >/corp/tbec,3"
See how that works for you.
> *Warning*: [MapServer Error]: msOGRFileOpen(): Open failed for OGR
> connection `corp/tbec'. File not found or unsupported format. in
> */home/www/htdocs/viewer/out/map.php* on line *161*
It is still possible that "file not found" is correct, so make sure your
path is right and as suggested, use the full path when testing and terse
it up a bit as you get comfortable that it works.
> I have been sitting here reading/scouring docs and the userlist all day
> looking for suggestions/examples and have run out.
The key to search on is "mapserver", "coverage" and "connectiontype ogr" -
should give you a good swath of ideas via google.
More information about the mapserver-users