I'll have to admit that this is not cutting edge mapping, but it is platform independent using php4, unixodbc, and apache. It works on Linux and works on Windows. The objective here is to get map plotting working. Scalability and security are assured by using a relational database.
OGR
OGR is a vendor independent geospatial data access library included with gdal.
Simplify Data
To illustrate properly map plotting of point data such as addresses we have set up a database table containing longitude and latitude data.
Map Server
Map Server is configured to read from the database and display custom icons for point data.
OGR Configuration
MapFile Configuration
The following configuration lets the user plot different icons given the value of icon_id. The layer will only display icons from the mapping_plot table where parameters_id is equal to 1. This is achieved using the FILTERITEM and FILTER keywords. Labels are shown from the tables remarks column.
LAYER
NAME "MapPlottingbob"
CONNECTION "conf/MapPlotting.ovf"
CONNECTIONTYPE OGR
STATUS ON
TYPE POINT
DATA mapping_plot
CLASSITEM icon_id
FILTERITEM "parameters_id"
FILTER "1"
LABELITEM "remarks"
CLASS
EXPRESSION "1"
SYMBOL "/home/phil/liveaxis/src/rose-0.3.7/graphics/crime.png"
STYLE
COLOR 0 0 0
END
LABEL
MINFEATURESIZE 40
MINDISTANCE 150
POSITION UR
SIZE MEDIUM
COLOR 0 0 255
END
TEMPLATE "templates/MappingPlot/MappingPlot.html"
END
CLASS
EXPRESSION "2"
SYMBOL "/home/phil/liveaxis/src/openaddress/src/plotting/icons/1.gif"
STYLE
COLOR 0 0 0
END
LABEL
MINFEATURESIZE 40
MINDISTANCE 150
POSITION UR
SIZE MEDIUM
COLOR 0 0 255
END
TEMPLATE "templates/MappingPlot/MappingPlot.html"
END
CLASS
EXPRESSION "3"
SYMBOL "/home/phil/liveaxis/src/openaddress/src/plotting/icons/2.gif"
STYLE
COLOR 0 0 0
END
LABEL
MINFEATURESIZE 40
MINDISTANCE 150
POSITION UR
SIZE MEDIUM
COLOR 0 0 255
END
TEMPLATE "templates/MappingPlot/MappingPlot.html"
END
HEADER "templates/MappingPlot/MappingPlot_header.html"
FOOTER "templates/MappingPlot/MappingPlot_footer.html"
END
No comments:
Post a Comment