Mapserver Project

So I’ve had a few days to work on my Mapserver project, and I am enjoying every bit of it. I remember setting up an ArcGIS Web Services built around an MXD file. Getting a map to show up in your browser took forever. Getting the same map to display when served by Mapserver takes only a sec. Don’t get me wrong, I am not rating technology here. It’s simply been so much easier to get some useful results with Mapserver.

So I’ve cobbled together a simple HTML template with a simple CSS (for the design of a few div’s) and map controls for zoom/pan and adding data layers. Essentially this was based on any number of Mapserver Tutorials, e.g. Mitchell’s Web Mapping book or Beginning Mapserver. Initially, I was having some problems trying to reference the correct directories for Apache and mapserv. For example, I found that the href=”…” for the css <link> didn’t work as a relative link. It had to be an absolute link to the location of the CSS file even if that was located in the same directory as the HTML template.

Also, I remembered the hard way that while you can spread your <form> over multiple <div>’s you can’t do this and expect it to work:

<div1>
   <form>
</div1>
<div2>
   </form>
</div2>                 YIKES !!!

As you can see, right now, I have 3 zoom controls, and (for trial purposes) 4 data layers – counties and interstates to help you zoom to your area of interest, and roads and geology for more detail – that can be turned on and off. As soon as I get around to it, I will add capability to hide certain layers at large scales and add labeling for layers at zoom scales where it makes sense. Then, I would like add a tool that allows the user to add project specific data points, e.g. boreholes stored in SHP files, by selecting from a list of project numbers. In an effort to stay clear of ArcGIS, I will look into using PostGIS for this.

It took me a long time re-create some of the color/hatch patterns for the geology map which I have been typically been producing through an ArcGIS style file. This was good practice for a first Mapserver project, but there may be a better/faster/more accurate way to re-produce this map effects. I remember reading somewhere     that creating maps in Quantum GIS and then saving your styles in mapfile format is one way to go. Here is someone trying to use ArcGIS styles in QGIS.

In the process of wanting to make this an all Open Source project, I had to resort to OGR once again to combine public roads data from 25 counties into one shapefile for Mapserver. Im pretty sure there is a way to use some kind of tiling for this but I haven’t gotten that far. Anyway… new lessons learned with OGR int he next post.

 

Leave a Comment

Filed under Mapserver

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>