GEOSS Banner

Section 4.3.1: Offering a DXF file with mapserver WFS

4.3.1 Offering a DXF file with mapserver WFS

4.3.1.1. Step 1: MapServer Installation

MapServer is an Open Source project which can be installed from several Windows Installers. In this tutorial we are going to describe two different installers: OSGeo4W and MS4W. In both cases a step by step explanation is done, while specifying requirements of the system and common errors during the installation.

Other documentation of interest:

• MapServer http://www.mapserver.org/

• Introduction to MapServer: http://www.mapserver.org/introduction.html

• Mapfile Reference: http://www.mapserver.org/mapfile/

• Data Input in MapServer: http://www.mapserver.org/input/

• OGC Support in MapServer: http://www.mapserver.org/ogc/

A. Installation of mapserver with MS4W

Download MS4W

1. Download the version available at

http://www.maptools.org/ms4w/index.p...downloads.html of the Set up exe installer: ms4w-3.0.3-setup.exe

image22.png

A. Installation of the MS4W

2. To install the MS4W .zip file, use a compression program (e.g. WinZip) to extract the package at the root of a drive, e.g., drive C:. If successful, you should have a new directory named 'ms4w' at the root of the drive you chose (e.g. C:/ms4w).

Start your MS4W Apache Web Server by running /ms4w/apache-install.bat (at the command line or by double-clicking it). This file installs Apache as a Windows service (called "Apache Web Server") so that it starts whenever your machine is restarted. When executed, a DOS window should pop up with the following message:

Installing the Apache MS4W Web Server service
The Apache MS4W Web Server service is successfully installed.
Testing httpd.conf....
Errors reported here must be corrected before the service
can be started.
The Apache MS4W Web Server service is starting.
The Apache MS4W Web Server service was started successfully.

This means that Apache is running and installed as a service.

The window “Setup: License Agreement” will appear. Read the license agreement and click I Agree.

image23.png

3. An “Installation Option” windows will open. Select your installation options.

image24.png

After selecting your installation options click “Next”.

4. When the “Installation Folder” opens, you must specify the location to install the MS4W. Usually this is set to the root directory (C:). Then click “Next”.

image25.png

5. Set the Apache port. The port you set doesn’t have to be already in use. If you think that the port 80 might be already in use then try a higher port number (above 1024) such as 8081. Click “Install”.

 

image26.png

A downloading window will show the progress of the installation.

 

image27.png

 

image28.png

Verification

6. There are two options to verify that the mapserver is correctly installed, one way would be that on the MS4W-Shell DOS window type mapserv –v. The DOS window should show the following message:

 

image29.png

Another way to verify if mapserver is installed is by browsing to the localhost, and then the following page should be seen:

image30.png

If you want to install more programs, they have to be downloaded into the root of the ms4w directory.

 

image31.png

Not that in both cases there are no addon packages installed into your localhost. If you want to install new applications these should be downloaded from Mapserver web page http://www.mapserver.org/, and save the new application to the root directory were the mapserver is installed, as accept to replace the files you have for the new ones.

 

B. Installation with OSGeo4W

OSGeo4W is an installer for the Windows operating system that contains several packages related to the Open Source Geospatial Foundation.

Website: http://www.osgeo.org

Introduction

OSGeo4W is a Windows installer that downloads and/or updates MapServer, add-on applications, and also other Open Source geospatial software. The following steps illustrate how to use OSGeo4W:

Download OSGeo4W

1. Download OSGeo4W

Download OSGeo4W Installer from: http://download.osgeo.org/osgeo4w/osgeo4w-setup.exe

2. Start the OSGeo4W Installer

2.1Execute (double-click) the ‘osgeo4w-setup.exe’, and a new window should openChoose an option on this new window.

 

image32.png

 

Choose an option on this new window.

- The “Express Desktop Install” option contains options for higher-level packages such as MapServer, GRASS and u-Dig.

- The “Express Web-GIS Install” option, can be a basic option

- The “Advanced Install” gives you full access to choosing command line tools and applications for MapServer that are not included in the Express installation.

Once you have one of the options installed, all other options or packages can be updated or downloaded afterwards. It will be explained later on this tutorial.

2.2 On this new window choose the “Advanced Install” option.

A new window will open, choose the Download Source and click “Next”.

image33.png

Select the root directory where the program will be installed.

image34.png

Next window that appears has it set by default by the

Firefox. We change it to the desired one.

image35.png

Select your internet connection.


image36.png

2.3 Select the packages to install

image37.png

On this page, you can click into each of the Default texts. For example, when clicking on the “Web Default” text, a drop-down menu will open indicating which Web’s sub-packages are going to be installed by default. You can also click on the “skip” text besides the sub-package name (such as MapServer) to install a package that by default would not be installed.

image38.png

Note: If the Selected package option is left with the Skip text on, this will mean that the installation of that package will not be done. To select a package, you have to click on the Skip text to obtain:

image39.png

You can see that the size of the package vary depending on the option you set up.

After setting up which packages you want to install, a new window opens. On the “Create Icons” window you have to select one or both options offered.

image40.png

2.4 Download Packages/Installation

image41.png

The installer should now automatically fetch and install MapServer and all of its libraries from the OSGeo download server.

2.5 Finish Installation

Once downloading and installation from the OSGeo download server is complete, you can now optionally choose to creat shortcuts for OSGeo4W on your desktop, and also in your Start Menu (both are recommended). Click the “Finish” button to finalize the installation.

2.6 To verify that MapServer installation is working You can verify that MapServer is installed through several ways.

To run the program firstly you need to open the OSGeo4W Shell that you will find on:

Start/OSGeo4W/OSGeo4W Shell

Or

It can be also available as a shortcut in your computer


Note: The fist time you try to run the OSGeo4W Shell, you may need to browse to your Shell in order to open it. Comprovar la manera que diu el tutorial descarregat….

Secondly, you need to run the apache-install.bat script to install the Appache Service. This will be ran through the OSGeo4W shell (DOS window)

Access to the http://127.0.0.1/

Note: Be aware that if you have changed the default port number during the installation process you will then have to access to the http://127.0.0.1:81

To verify that MapServer is working, go to

http://127.0.0.1/cgi-bin/mapserv.exe . This page should appear.

4.3.1.2. Step 2: Setup a DXF file in MapService Open the OSGeo4W Shell

In order to set up a DXF file with mapserver, you first need make sure that the GRASS package has been installed when installing the mapserver. This can be easily done by accessing to the http://127.0.0.1/ (or your mapserver home page), if GRASS is installed, you should see it on the list of packages. Otherwise, you should go to the step 2. Installatiojn, and select the package on the step 2.3.

Ones installed open the OSGeo4W Shell

Run the apache-install.bat script in the OSGeo4W Shell

On your “All Programs”, under the OSGeo4W it should also have a quick link to GRASS.

To have more information on GRASS, please go to http://mirrors.ibiblio.org/grass/intro/general.php and http://mirrors.ibiblio.org/grass/intro/firsttime.php.

4.3.1.3. Step 3: Test your WFS Service in clients

Accessing the service

1. Start uDig, under the File menu select New > New Map to create a new map.

2. Make sure your local GeoServer is started and ready to go.

3. Select Layer > Add

4. This will bring up a Wizard allowing you to choose which Data source you want to use.. Select Web Feature Server.

5. This open a window where you have to insert the URL of a web feature server you want to access. In our case type: http://localhost:8080/geoserver/wfs? and click Next.

6. You have now access to all WFS layers available on our Mapserver, press the Finish button. The layer will be drawn on your map.

4.3.1.4 Step 6: Optimizing the service performance and maintenance

Information regarding optimization can be found in http://mapserver.org/optimization/vector.html

4.3.1.5 Step 7: Service errors and troubleshooting

Common errors can be found in http://mapserver.org/errors.html


<<Prev T.O.C.  Next>>
Tag
none

Files (0)

 
You must login to post a comment.