[Mapserver-users] A few Mapserv questions
James Mclean
james at lanpad.org
Sat Jan 31 18:41:57 PST 2004
Hi All,
I have worked through the Tutorial on getting mapserver 4.0 to work, but
after the first tutorial I have some questions...
Please bear in mind that I am new to this GIS type stuff, its like
learning french to me. Im a programmer, not a GIS guy :)
I have created a basic .map as outlined in the tutorial, and after
working through some problems because of a missing PROJ library, I have
a working mapserv binary.
The basic map file I am using (test.map) is as below... A direct copy
and paste from the tuit, with the nesicerry changes.
MAP
IMAGETYPE PNG
EXTENT 254184.15504499 6174213.6411365 314868.3598851 6210501.3473782
SIZE 400 300
SHAPEPATH "/home/jamesmc/asm2.air-stream.org/maps/i5409/"
IMAGECOLOR 255 255 255
PROJECTION
"proj=laea"
"ellps=clrk66"
"lat_0=45"
"lon_0=-100"
#
# Alternatively, you can specify an EPSG code.
# "init=epsg:2163"
#
END
# Start of LAYER DEFINITIONS
---------------------------------------------
LAYER # States polygon layer begins here
NAME states
DATA i5409t_r
STATUS DEFAULT
TYPE POLYGON
PROJECTION
"init=epsg:4269"
END
CLASS
COLOR 232 232 232
OUTLINECOLOR 32 32 32
END
END # States polygon layer ends here
# End of LAYER DEFINITIONS -------------------------------
END # end of map file/object
First question is, the EXTENT paramerter in the map file. What exactly
are the numbers ment to be? The tuit says 'Meters', so I assume that
means Easting, Northing, but what are the last two? How can I tell what
format my maps use?
Second question is, I have my SHAPEPATH set correctly (I presume), the
directory has 242 files with the extensions .dbf, .prj, .shp, .shx. I
assume these are the ERSI Shapefiles I need to reference?
The data I downloaded was 1:250K Australian maps, in the MapInfo
Shapefile format.
In the LAYER section, I have 'DATA i5409t_r', but i5409t_r is just one
file. What if the data I want is not in that particular file? How do I
know what is in each file? I tried ogrinfo, but I dont understand half
of whats going on with it... ogrinfo says 'i5409t_r' is a Polygon file,
as what TYPE says in test.map.
Based on the above map file, nothing is generated but a plain, white
image. Changing the IMAGECOLOR does change the color of the image, so
its not a web caching issue.
I would like to browse the ERSI Shapefiles to see the maps in them,
whats a good program I can use on Linux to do so? I do not have access
to a Microsoft based system. Is there a generic .map file I can use with
Mapserver to browse my ERSI Shapefiles? Dont say GRASS, im not a GIS
professional, I cant understand that program...
How can I view the 'layers' in my shapefiles?
I am using Debian 3.1 unstable, on kernel 2.4.22 on x86. Mapserver
version is 4.0.1, GCC 3.3.3, Mapserver configure command = ./configure
--with-ogr=/home/jamesmc/src/gdal-1.1.9 --with-gdal --with-proj
--with-jpeg --with-gd --with-httpd=/usr/sbin/apache
Apache version is 1.3.29
PHP/Mapscript not built, using mapserv cgi binary.
No errors encountered in the browser, or in HTTPD logs.
URL
http://127.0.0.1/cgi-bin/mapserv?map=/home/jamesmc/asm2.air-stream.org/maps/maps/test.map&mode=map
I hope someone is able to shed light on these questions, I would rather
do it myself with Mapserver than use mapblast, which cant generate an
Australian map to save its life...
Regards
James Mclean
More information about the MapServer-users
mailing list