On 12/01/11 05:59, Alan Boudreault wrote:
Hi Cameron, I've written a first version of the quick start. It is very simple
and basic. Let me know if it's ok.
Alan
Alan,
This is a good first draft of a Quickstart, you have covered an
appropriate depth of a use case.
In improving it, I suggest that you add a few descriptive words around
each step, explaining "Why" you are doing each step.
Note that our target user likely won't have heard of MapServer, won't
know that MapServer is only server based rather than a desktop
application, might not know what a WMS is or what styling a feature
means. So you should add a few extra sentences to spell this out.
For a good example which uses similar terminology, I suggest looking at
the Geoserver Quickstart:
http://adhoc.osgeo.osuosl.org/livedvd/docs/en/quickstart/geoserver_quickstart.html
I hope you don't mind me CCing the Live List with these comments, as
they will be applicable to other authors as well.
Below are a few specific comments ...
MapServer Quickstart¶
MapServer is an Open Source <http://www.opensource.org> geographic
data rendering engine. It allows you create “geographic image maps”.
I suggest something like:
... It is a server based application which allows you to publish
geographic map images and vector layers to the internet using OGC standards.
This Quick Start describes how to:
* Create a mapfile
... Configure Mapserver through using the "mapfile" configuration file
* Visualize a map using Web Map Service (WMS)
... using the Web Map Service (WMS) interface and browser client
* Add a new layer from a shapefile
* Style a layer
Create a mapfile¶
Firstly, we are going to create a simple mapfile.
1. Open any text editor (Mousepad is the default text editor on the
live dvd: /Applications ‣ Accessories ‣ Mousepad/).
2. Create the file “mapserver_quickstart.map” in your home
directory: /home/user/mapserver_quickstart.map
The file should contains the following content:
MAP
NAME "MAPSERVER QUICKSTART"
STATUS ON
EXTENT -137 29 -53 88
UNITS DEGREE
SHAPEPATH "/home/user/data/natural_earth/"
SIZE 800 600
PROJECTION
"init=epsg:900913"
END
OUTPUTFORMAT
NAME 'AGG/PNG'
DRIVER AGG/PNG
END
LAYER
NAME "Admin Countries"
STATUS DEFAULT
TYPE POLYGON
DATA "10m-admin-0-countries"
CLASS
STYLE
COLOR 246 241 223
OUTLINECOLOR 0 0 0
END
END
END
END
I suggest adding a few paragraphs here explaining the structure of the
mapfile. Explain the Field/Attribute relationship and the structure of
the document, probably using one or 2 of the attributes as an example.
Note
The example uses the natural earth dataset, which is already installed
on the live dvd: ~/data/natural_earth (a short cut to
/usr/local/share/data/natural_earth)
Visualize the map using WMS¶
Add a few paragraphs here adding some background content. Probably
explaining that mapserver is a web service, and that you are passing in
parameters to the mapfile, and requesting a WMS request, which is then
being built into a image. An alternative way to query would be via a WFS
interface for vector data.
(Please don't copy my words verbatim, I'm sure you could write better)
Open the web browser and enter the following URL:
http://localhost/cgi-bin/mapserv?map=/home/user/mapserver_quickstart.map&SERVICE=WMS&REQUEST=Getmap&VERSION=1.1.1&LAYERS=Admin%20Countries&SRS=EPSG:4326&BBOX=-137,29,-53,88&FORMAT=AGG/PNG&WIDTH=800&HEIGHT=600
You should see a map of north america.
Add a new layer from a shapefile¶
We will now add a new layer to our mapfile. Before last /END/
statement in the mapfile, add the following layer configuration:
LAYER
NAME "Lakes"
STATUS DEFAULT
TYPE POLYGON
DATA "10m_lakes"
CLASS
STYLE
COLOR 153 179 204
END
END
END
In your browser, visualize the map using this URL:
http://localhost/cgi-bin/mapserv?map=/home/user/mapserver_quickstart.map&SERVICE=WMS&REQUEST=Getmap&VERSION=1.1.1&LAYERS=Admin%20Countries,Lakes&SRS=EPSG:4326&BBOX=-137,29,-53,88&FORMAT=AGG/PNG&WIDTH=800&HEIGHT=600
You should now see the initial map with the lakes from our new layer.
Good, again a bit of content would help. Probably point out that you
have added "Lakes" to the URL, and a few other interesting things.
Style a layer¶
I suggest introduce this section by explaining what styling is (adding
colour to the map).
For example, we are going to style our lakes layer. The dataset
contains an attribute named /ScaleRank/, which is probably related to
the size of the lake. Modify the layer configuration to get:
LAYER
NAME "Lakes"
STATUS DEFAULT
TYPE POLYGON
DATA "10m_lakes"
CLASSITEM "ScaleRank"
CLASS
EXPRESSION /0|1/
STYLE
COLOR 153 179 204
OUTLINECOLOR 0 0 0
END
END
CLASS
STYLE
COLOR 153 179 204
END
END
END
The above layer configuration draws big lakes in a light blue with a
black outlines and all other lakes will be drawn in a dark blue.
What Next?¶
This is only the first step on the road to using MapServer. There is a
lot more great material (and ability) left for you to discover on our
website.
Suggest you briefly summarise highlights of things people will find in
the documentation. Eg: WFS interface, web interface, how to style, how
to ...
* Check MapServer documentation, tutorials and examples available
on http://mapserver.org/en/documentation.html
--
Cameron Shorter
Geospatial Solutions Manager
Tel: +61 (0)2 8570 5050
Mob: +61 (0)419 142 254
Think Globally, Fix Locally
Geospatial Solutions enhanced with Open Standards and Open Source
http://www.lisasoft.com
--
Cameron Shorter
Geospatial Solutions Manager
Tel: +61 (0)2 8570 5050
Mob: +61 (0)419 142 254
Think Globally, Fix Locally
Geospatial Solutions enhanced with Open Standards and Open Source
http://www.lisasoft.com
_______________________________________________
Live-demo mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/live-demo
http://wiki.osgeo.org/wiki/Live_GIS_Disc