/
Update .MAP file for Police layers
Update .MAP file for Police layers
For each Police layer you wish to display you will need to add a LAYER entry into the .MAP file.
You may copy the following Snippets into your .MAP file using the Map Editor in Studio.
The examples below use pg_police.inc to specify the database connection details. You may need to change the INCLUDE value to specify your database connection details.
Police Layers
Layer Name | Snippet | Thumb |
---|---|---|
StreetCrimeCrosstab
| LAYER METADATA WMS_TITLE "Street Crime Crosstab" WFS_TITLE "Street Crime Crosstab" "gml_featureid" "ogc_fid" "gml_include_items" "all" "wfs_abstract" "All crimes reported at street level in the given month with one record per location" "wms_abstract" "All crimes reported at street level in the given month with one record per location" END NAME "StreetCrimeCrosstab" GROUP Police DUMP TRUE STATUS OFF INCLUDE "pg_police.inc" DATA 'wkb_geometry FROM streetcrime_crosstab USING UNIQUE ogc_fid USING SRID=27700' TYPE POINT CLASS STYLE SYMBOL "circle" COLOR 255 0 0 SIZE 8 END END END | |
StreetCrimeCluster | LAYER # Optional layer for displaying street crimes as a cluster with size proportional to the number of crimes, for display purposes only METADATA WMS_TITLE "Street Crime Cluster" WFS_TITLE "Street Crime Cluster" "gml_featureid" "ogc_fid" "gml_include_items" "all" "wfs_abstract" "All crimes reported at street level in the given month with one record per location, clustered" "wms_abstract" "All crimes reported at street level in the given month with one record per location, clustered" END NAME "StreetCrimeCluster" GROUP Police REQUIRES "[StreetCrime]" # will only display when street crimes layer is activated DUMP TRUE STATUS DEFAULT INCLUDE "pg_police.inc" DATA 'wkb_geometry FROM street_crimes USING UNIQUE ogc_fid USING SRID=27700' TYPE POINT CLUSTER MAXDISTANCE 50 REGION "ellipse" END LABELITEM "Cluster:FeatureCount" CLASS NAME "Street Crime Clusters" STYLE SYMBOL "circle" COLOR 0 0 255 SIZE [Cluster:FeatureCount] MINSIZE 10 MAXSIZE 30 OPACITY 30 END LABEL FONT arial TYPE TRUETYPE SIZE 7 COLOR 255 255 255 ALIGN CENTER PRIORITY 10 BUFFER 1 PARTIALS TRUE POSITION CC END END END | |
StreetCrime | LAYER METADATA WMS_TITLE "Street Crime" WFS_TITLE "Street Crime" "gml_featureid" "ogc_fid" "gml_include_items" "all" "wfs_abstract" "All crimes reported at street level in the given month with one record per crime" "wms_abstract" "All crimes reported at street level in the given month with one record per crime" END NAME "StreetCrime" GROUP Police DUMP TRUE STATUS OFF INCLUDE "pg_police.inc" DATA 'wkb_geometry FROM street_crimes USING UNIQUE ogc_fid USING SRID=27700' TYPE POINT CLASSITEM "crime_type" CLASS NAME "Crime clusters" MAXSCALEDENOM 1 STYLE SYMBOL "circle" SIZE 15 COLOR 0 0 255 OPACITY 30 END END CLASS NAME "Bicycle Theft" EXPRESSION "Bicycle Theft" STYLE SYMBOL "circle" OUTLINECOLOR 95 30 95 SIZE 8 END END CLASS NAME "Burglary" EXPRESSION "Burglary" STYLE SYMBOL "circle" COLOR 255 0 0 SIZE 6 END END CLASS NAME "Criminal damage and arson" EXPRESSION "Criminal damage and arson" STYLE SYMBOL "circle" COLOR 135 30 155 SIZE 6 END END CLASS NAME "Drugs" EXPRESSION "Drugs" STYLE SYMBOL "circle" COLOR 0 255 255 SIZE 6 END END CLASS NAME "Other crime" EXPRESSION "Other crime" STYLE SYMBOL "circle" COLOR 132 0 0 SIZE 6 END END CLASS NAME "Other theft" EXPRESSION "Other theft" STYLE SYMBOL "circle" COLOR 102 51 0 SIZE 6 END END CLASS NAME "Possession of weapons" EXPRESSION "Possession of weapons" STYLE SYMBOL "circle" COLOR 102 102 255 SIZE 6 END END CLASS NAME "Public order" EXPRESSION "Public order" STYLE SYMBOL "circle" COLOR 255 255 0 SIZE 6 END END CLASS NAME "Robbery" EXPRESSION "Robbery" STYLE SYMBOL "circle" COLOR 204 102 0 SIZE 6 END END CLASS NAME "Shoplifting" EXPRESSION "Shoplifting" STYLE SYMBOL "circle" COLOR 0 0 153 SIZE 6 END END CLASS NAME "Theft from the person" EXPRESSION "Theft from the person" STYLE SYMBOL "circle" COLOR 96 96 96 SIZE 6 END END CLASS NAME "Vehicle crime" EXPRESSION "Vehicle crime" STYLE SYMBOL "circle" COLOR 0 153 0 SIZE 6 END END CLASS NAME "Violence and sexual offences" EXPRESSION "Violence and sexual offences" STYLE SYMBOL "circle" COLOR 102 0 102 SIZE 6 END END END | |
StreetOutcomes | LAYER METADATA WMS_TITLE "Street Outcomes" WFS_TITLE "Street Outcomes" "gml_featureid" "ogc_fid" "gml_include_items" "all" "wfs_abstract" "All crime outcomes reported at street level in the given month" "wms_abstract" "All crime outcomes reported at street level in the given month" END NAME "StreetOutcomes" GROUP Police DUMP TRUE STATUS OFF INCLUDE "pg_police.inc" DATA 'wkb_geometry FROM street_outcomes USING UNIQUE ogc_fid USING SRID=27700' TYPE POINT CLASS STYLE SYMBOL "circle" OUTLINECOLOR 95 30 155 SIZE 8 END END END | |
Neighbourhood_Teams | LAYER METADATA WMS_TITLE "Neighbourhood Teams" WFS_TITLE "Neighbourhood Teams" "gml_featureid" "ogc_fid" "gml_include_items" "all" "wfs_abstract" "Police Neighbourhood Team Members" "wms_abstract" "Police Neighbourhood Team Members" END NAME "Neighbourhood_Teams" GROUP Police DUMP TRUE STATUS OFF INCLUDE "pg_police.inc" DATA "wkb_geometry from (select * from police_neighb_teams) as subquery using unique ogc_fid using srid=27700" TYPE POLYGON CLASS NAME '' STYLE OUTLINECOLOR 0 0 255 END END END | |
Neighbourhood_Events | LAYER METADATA WMS_TITLE "Neighbourhood Events" WFS_TITLE "Neighbourhood Events" "gml_featureid" "ogc_fid" "gml_include_items" "all" "wfs_abstract" "Police Neighbourhood Events" "wms_abstract" "Police Neighbourhood Events" END NAME "Neighbourhood_Events" GROUP Police DUMP TRUE STATUS OFF INCLUDE "pg_police.inc" DATA 'wkb_geometry from neighbourhood_events USING UNIQUE ogc_fid USING SRID=27700' TYPE POINT CLASS STYLE SYMBOL "police2" SIZE 12 END END END | |
Neighbourhood_Crimes | LAYER METADATA WMS_TITLE "Neighbourhood Crimes" WFS_TITLE "Neighbourhood Crimes" "gml_featureid" "ogc_fid" "gml_include_items" "all" "wfs_abstract" "All crimes reported per neighbourhood in the given month, mapped to boundary polygon" "wms_abstract" "All crimes reported per neighbourhood in the given month, mapped to boundary polygon" END NAME "Neighbourhood_Crimes" #ok GROUP Police STATUS OFF INCLUDE "pg_police.inc" DATA 'wkb_geometry from neighbourhood_crimes USING UNIQUE ogc_fid USING SRID=27700' TYPE POLYGON CLASS STYLE COLOR 54 106 217 OUTLINECOLOR 41 30 155 END END END | |
Neighbourhood_Boundaries | LAYER METADATA WMS_TITLE "Neighbourhood Boundaries" WFS_TITLE "Neighbourhood Boundaries" "gml_featureid" "ogc_fid" "gml_include_items" "all" "wfs_abstract" "Police neighbourhood boundary polygons" "wms_abstract" "Police neighbourhood boundary polygons" END NAME "Neighbourhood_Boundaries" GROUP Police STATUS OFF INCLUDE "pg_police.inc" DATA "wkb_geometry FROM neighbourhood_boundaries USING UNIQUE ogc_fid USING SRID=27700" TYPE POLYGON CLASS NAME "Police Neighbourhood Boundaries" STYLE OUTLINECOLOR 36 11 59 END END END | |
Police Stations | LAYER METADATA WMS_TITLE "Police Stations" WFS_TITLE "Police Stations" "gml_featureid" "ogc_fid" "gml_include_items" "all" "wfs_abstract" "Police station locations" "wms_abstract" "Police station locations" END NAME "Police_Stations" GROUP Police STATUS OFF INCLUDE "pg_police.inc" DATA "wkb_geometry FROM (select row_number() OVER() as ogc_fid, * from (select distinct name, address, postcode,type, description, wkb_geometry, force from neighbourhood_locations group by name, address, postcode,type, description, wkb_geometry, force) as subquery2) as subquery USING UNIQUE ogc_fid USING SRID=27700" TYPE POINT CLASS NAME "Police Station Locations" STYLE SYMBOL "Police" SIZE 12 END END END |
Related content
Police Downloader
Police Downloader
More like this
Create the Tasks to download the Police data
Create the Tasks to download the Police data
More like this
PGIS-04 13: Postgres Nuts and Bolts
PGIS-04 13: Postgres Nuts and Bolts
More like this
Create Job to Refresh Police data
Create Job to Refresh Police data
More like this
Thematic Mapping
Thematic Mapping
More like this
MapServer LAYER Object
MapServer LAYER Object
More like this