12.07.2015 Views

PostGIS 1.5.8 Manual - Fedora Project Packages GIT repositories

PostGIS 1.5.8 Manual - Fedora Project Packages GIT repositories

PostGIS 1.5.8 Manual - Fedora Project Packages GIT repositories

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>PostGIS</strong> <strong>1.5.8</strong> <strong>Manual</strong>42 / 310Chapter 5Using <strong>PostGIS</strong>: Building Applications5.1 Using MapServerThe Minnesota MapServer is an internet web-mapping server which conforms to the OpenGIS Web Mapping Server specification.• The MapServer homepage is at http://mapserver.org.• The OpenGIS Web Map Specification is at http://www.opengeospatial.org/standards/wms.5.1.1 Basic UsageTo use <strong>PostGIS</strong> with MapServer, you will need to know about how to configure MapServer, which is beyond the scope of thisdocumentation. This section will cover specific <strong>PostGIS</strong> issues and configuration details.To use <strong>PostGIS</strong> with MapServer, you will need:• Version 0.6 or newer of <strong>PostGIS</strong>.• Version 3.5 or newer of MapServer.MapServer accesses <strong>PostGIS</strong>/PostgreSQL data like any other PostgreSQL client -- using the libpq interface. This means thatMapServer can be installed on any machine with network access to the <strong>PostGIS</strong> server, and use <strong>PostGIS</strong> as a source of data. Thefaster the connection between the systems, the better.1. Compile and install MapServer, with whatever options you desire, including the "--with-postgis" configuration option.2. In your MapServer map file, add a <strong>PostGIS</strong> layer. For example:LAYERCONNECTIONTYPE postgisNAME "widehighways"# Connect to a remote spatial databaseCONNECTION "user=dbuser dbname=gisdatabase host=bigserver"PROCESSING "CLOSE_CONNECTION=DEFER"# Get the lines from the ’geom’ column of the ’roads’ tableDATA "geom from roads using srid=4326 using unique gid"STATUS ONTYPE LINE# Of the lines in the extents, only render the wide highwaysFILTER "type = ’highway’ and numlanes >= 4"CLASS# Make the superhighways brighter and 2 pixels wide

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!