Mapserver: Difference between revisions

From Wildsong
Jump to navigationJump to search
Brian Wilson (talk | contribs)
Brian Wilson (talk | contribs)
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
last updated 10-June-2008
== General MapServer notes ==
== General MapServer notes ==


Current release is 5.6.6
Current release is 7.0.4


Link to the official [http://mapserver.org/ MapServer web site]
Link to the official [http://mapserver.org/ MapServer web site]
Line 13: Line 11:
* It can act as a WMS.
* It can act as a WMS.
* It can act as a WFS.
* It can act as a WFS.
* It does '''not''' act as a WFS-T, so you can't edit data. See http://www.tinyows.org and also [[GeoServer]]
* It does '''not''' act as a WFS-T, so you can't edit data. The workaround is to use [http://mapserver.org/tinyows/index.html TinyOWS].


What is a WMS?  An OGC-compliant "Web Map Server"
What is a WMS?  An OGC-compliant "Web Map Server"
Line 20: Line 18:
feature sets from the WFS instead of entire maps.
feature sets from the WFS instead of entire maps.


WFS-T "T" means transactions and that means writing data back to the server.
WFS-T "T" means transactions and that means writing data back to the server. TinyOWS is tightly tied to [[PostGIS]]


You can combine it with other components to enhance its functionality.
You can combine mapserver with other components to enhance its functionality.


== Implementation ==
== Implementation ==
Line 44: Line 42:


You can craft an application from scratch but a more sensible approach is to hang your data files on an existing applications. Here are some little reviews on a few of the more popular free applications for mapserver.
You can craft an application from scratch but a more sensible approach is to hang your data files on an existing applications. Here are some little reviews on a few of the more popular free applications for mapserver.
==== Openlayers and Leaflet ====
Openlayers and Leaflet are obvious choices.
==== Geomoose ====
I have a separate page for it... [[Geomoose]]


=== Short reviews of some MapServer apps running under Linux ===
=== Short reviews of some MapServer apps running under Linux ===
Line 77: Line 83:


Features: all the usual ones: select layers, a 'places' selection list, zoom in, zoom out, pan, and identify. A reference map. A list of map sizes (800x600 etc) The identify tool is set to query cities. (This is only a demo, don't be hard on it.)
Features: all the usual ones: select layers, a 'places' selection list, zoom in, zoom out, pan, and identify. A reference map. A list of map sizes (800x600 etc) The identify tool is set to query cities. (This is only a demo, don't be hard on it.)
==== ka-Map! ====
My demo: http://mapserver.wildsong.biz/kamap/ <br>
Officual site: http://ka-map.maptools.org/
ka-Map builds on gmap, and has a very simple user interface. When you pan, it actually moves pixels on the screen; most interfaces just repaint the entire window on each pan. Some people say that Google Maps inspired ka-map.
Three data sets are enabled, one for Santa Rosa, Sonoma County, California (CDS Wireless), one for Corvallis, Benton County, Oregon (Corvallis Parks) and the default Canada map.
Ka-map is very easy to set up too.


==== Chameleon ====
==== Chameleon ====
Line 108: Line 103:
==== ELLAmaps ====
==== ELLAmaps ====


Of course there is ELLAmaps which only works with the Internet Explorer browser.
I used to have a section here all about ELLAmaps. I leave this note here out of nostalgia.
 
It was used in Benton county for years. It only worked with Internet Explorer!
You can see it in action at [http://gis.co.benton.or.us/v09_10/Source/Container.htm Benton County GIS],
[http://www.co.linn.or.us/webmap/v0991/Source/Container.htm Linn County GIS], and [http://apps.co.polk.or.us/webmap/source/Container.asp Polk county]
 
In theory I should be able to make it run on a Linux server.
I spent a few hours hand editing the server files to no avail.
Really it's not worth working on it since this project is going to be retired.
 
ELLAmaps relies on a win32 desktop tool called PCMapUtil. This tool is basically the equivalent of the Author tool for ArcIMS; you use it to specify what layers will be available and how to display them. It creates XML and MAP files as output. The MAP files are directly used by mapserver. The XML files are used by the ActiveX/Javascript application that is the client side part of ELLAmaps.
 
PCMapUtil is built in VB6 with ArcObjects, so you have to have ArcView installed in order to run it. It uses an Access database file to store its settings.
 
Settings in PCMapUtil (not everything, just what I typed before getting too bored)
 
Web Configuration
* Title
* Title link
* Contact
* Contact email
* Disclaimer
* Application Root (Web)
* Application Root (Drive)
* Web Server Shape Path
* Network Shape Path
* MetaData URL
* Places URL
* Advanced Search Page
* Map Extent
* Maximum Search Results
* Reference Map Filename
* Reference Extent
* Reference Size
 
Maps
* Map Name
* Available Layers
* Selected Layers
 
Layer configuration -- all settings for each layer
* Display - symbology is specified here
* Layer fields
 
[[Image:ELLA_Sample.mdb|Sample MDB file]]<br>
[[Image:ELLA_MapServ_sample.xml|Sample MapServ.xml file]]
[[Image:ELLA_places_sample.xml|Sample places.xml file]]<br>
[[Image:ELLA_sample.map|Sample MAP file]]


==== Maplab ====
==== Maplab ====

Latest revision as of 18:35, 18 September 2017

General MapServer notes

Current release is 7.0.4

Link to the official MapServer web site

MapServer is for building Web-based GIS applications.

What can I do with MapServer?

  • It can act as a WMS.
  • It can act as a WFS.
  • It does not act as a WFS-T, so you can't edit data. The workaround is to use TinyOWS.

What is a WMS? An OGC-compliant "Web Map Server"

What is a WFS? An OGC-compliant "Web Feature Server" allows WFS clients to access feature sets from the WFS instead of entire maps.

WFS-T "T" means transactions and that means writing data back to the server. TinyOWS is tightly tied to PostGIS

You can combine mapserver with other components to enhance its functionality.

Implementation

Linux

I have more information on my public Linux server down below, and details on setting up the server here: Mapserver on Linux

Windows

When I installed Mapserver on City of Corvallis Windows servers I made these notes: Mapserver on Windows This server is currently behind a firewall. (links on the Windows page only work on my desktop machine there.)

Using MapServer on Linux

Mapserver applications

A mapserver app is the collection of files necessary to create an interactive site. Mapserver by itself takes input in the form of spatial data and a .MAP file, and turns out an image file containing a map.

Creating an application requires assorted template and html and javascript files to 'wrap around' mapserver and present the maps and a user interface to allow panning, zooming, querying and so forth.

You can craft an application from scratch but a more sensible approach is to hang your data files on an existing applications. Here are some little reviews on a few of the more popular free applications for mapserver.

Openlayers and Leaflet

Openlayers and Leaflet are obvious choices.

Geomoose

I have a separate page for it... Geomoose

Short reviews of some MapServer apps running under Linux

I have sample setups of each of these on my server to try them out.

Rosa

Site: http://www.maptools.org/rosa/index.phtml

Rosa is a simple Java applet. It displays an image (GIF, JPEG or PNG) on which operations can be performed, these include single clicks, dragging a rectangle, ellipse, or polyline to define an area of interest. It can also have a toolbar and/or floating buttons with various functions attached to them. The information on the user's input will be returned through form parameters that you define.

If you install gmap, you get a copy of the Rosa applet at no extra charge.

I am thinking that Rosa's pretty mature since the last development release was 2003. There is an active discussion thread so usage and the support are still available. This could be considered a good thing (that is, it's stable and still usable).

There does not seem to be much documentation available and the Rosa portion of gmap does not work (for me). So I am going to try to get a copy going on my server and that end I will create this Rosa page.

gmap

My sample installation: http://mapserver.wildsong.biz/gmap/index.phtml
Site: http://gmap.maptools.org/

I have version 4.0 installed currently.

This is a sample PHP/Mapscript implementation. You can turn layers on and off, you can redraw and resize the map.

It will use the Rosa Java applet by default but you can turn it off. With my IE system, the Java app did not work. The non-Java version works fine.

Easy to set up. Especially if you want a map of Canada. :-)

Features: all the usual ones: select layers, a 'places' selection list, zoom in, zoom out, pan, and identify. A reference map. A list of map sizes (800x600 etc) The identify tool is set to query cities. (This is only a demo, don't be hard on it.)

Chameleon

This one is not working today. Brian Wilson 15:07, 7 May 2006 (PDT)

Chameleon is a framework on which to hang OGC compliant services (and Mapbender is another one). Since I don't really care about OGC right now (I am sufficiently confused already I am not pursuing full knowledge and understanding of Chameleon or Mapbender.

To get Chameleon running under Linux, I had to add support for wmsclient to MapServer (Mapscript) which in turn required curl.

"Running" is sort of metaphorical here. It's installed and generates no error messages but the demo does not work. I followed the installation instructions and then dozed off trying to read the documentation pages at http://chameleon.maptools.org/help/viewer.phtml

My sample: http://mapserver.wildsong.biz/chameleon/

The docs for it: http://mapserver.wildsong.biz/chameleon_docs

Site: http://chameleon.maptools.org/index.phtml

ELLAmaps

I used to have a section here all about ELLAmaps. I leave this note here out of nostalgia. It was used in Benton county for years. It only worked with Internet Explorer!

Maplab

Site: http://maptools.org/maplab/index.phtml

MapLab development is on hold, see the above link. I was not really knocked out when I did have my sample site going so I probably won't bother to re-activate it. IMHO, building map files has to be the weakest link in Mapserver.

Mapserver and SVG

Since version 4.5, mapserver has supported SVG as an output format. Refer to the official SVG howto at the mapserver site.

As with the other output formats, pretty much all you need do to use it is to specify the file type as SVG in the MAP file. (Of course, support for svg has to be built into mapserver.)

Change IMAGETYPE PNG to IMAGETYPE SVG and the output file will be xml. That's about it.