Skip to content

Commit

Permalink
opzetje afritnummers mapfile op basis van RWS VILD
Browse files Browse the repository at this point in the history
  • Loading branch information
matthijsln committed Nov 7, 2017
1 parent 740417b commit 13b5ca2
Show file tree
Hide file tree
Showing 5 changed files with 139 additions and 0 deletions.
122 changes: 122 additions & 0 deletions maps/rws_vild.map
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
MAP
FONTSET "fonts.lst"
IMAGETYPE png
MAXSIZE 4000
SIZE 800 800
EXTENT -50000 260000 306000 665000
UNITS meters
WEB
METADATA
"ows_enable_request" "*"
"wms_srs" "EPSG:28992 EPSG:4326 EPSG:900913"
"labelcache_map_edge_buffer" "-10"
"wms_title" "Rijkswaterstaat Verkeersinformatie Locatie Database"
END
END
OUTPUTFORMAT
NAME png
TRANSPARENT ON
DRIVER AGG/PNG
MIMETYPE "image/png"
IMAGEMODE RGBA
EXTENSION "png"
END
CONFIG "MS_ERRORFILE" "stderr"
PROJECTION
"init=epsg:28992"
END

symbol
name 'afrit16'
type pixmap
image 'symbols/afrit16.png'
end

symbol
name 'afrit32'
type pixmap
image 'symbols/afrit16.png'
end

#DEBUG 5

LAYER
NAME "afritnummers25k"
TYPE POINT
CONNECTIONTYPE postgis
CONNECTION "host=localhost dbname=rws_vild user=osm password=osm port=5432"
DATA "geom from (select p.gid, p.geom as geom, v.exit_nr as exit_nr, v.first_name as first_name from tmcpoint p join vild512a_v2 v on (v.loc_nr = p.loc_nr) where length(v.exit_nr) > 0) as foo using unique gid using srid=28992"
GROUP "afritnummers"
# MINSCALEDENOM 25000
# MAXSCALEDENOM 81252 #afgestemd met de lcms.map; roads niveau 12
# PROCESSING "APPROXIMATION_SCALE=full"
PROJECTION
"init=epsg:28992"
END
class
label
text ' [exit_nr]'
color 255 255 255
font "anwb-uu"
type truetype
size 12
position cr
partials true
force true
STYLE
GEOMTRANSFORM 'labelpoly'
OUTLINECOLOR 255 255 255
WIDTH 3
END
STYLE
GEOMTRANSFORM 'labelpoly'
COLOR 0 107 189
WIDTH 2
END
end
label
text '[first_name]'
color 255 255 255
font "anwb-uu"
type truetype
size 10
position cr
offset 0 20
partials true
force true
STYLE
GEOMTRANSFORM 'labelpoly'
OUTLINECOLOR 255 255 255
WIDTH 3
END
STYLE
GEOMTRANSFORM 'labelpoly'
COLOR 0 107 189
WIDTH 2
END
end
end
END

# XXX niet bovenop label in enkel WMS verzoek?
LAYER
NAME "afritnummers25ki"
TYPE POINT
CONNECTIONTYPE postgis
CONNECTION "host=localhost dbname=rws_vild user=osm password=osm port=5432"
DATA "geom from (select p.gid, p.geom as geom, v.exit_nr as exit_nr from tmcpoint p join vild512a_v2 v on (v.loc_nr = p.loc_nr) where length(v.exit_nr) > 0) as foo using unique gid using srid=28992"
GROUP "afritnummers"
PROJECTION
"init=epsg:28992"
END
class
style
symbol 'afrit16'
offset 9 0
size 12
end
end
END
end

END
17 changes: 17 additions & 0 deletions maps/rws_vild.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
```sh
wget --recursive --no-parent -nH --level=1 --cut-dirs=7 -R "index.html*" -N "https://www.rijkswaterstaat.nl/apps/geoservices/geodata/dmc/vild/geogegevens/shapefile/Vild512a_Rd_definitief/"

createdb rws_vild
psql rws_vild -c 'create extension postgis'

pgdbf -s iso-8859-1 Vild512a_Rd_definitief/TopicRef.dbf > topicref.sql
pgdbf -s iso-8859-1 Vild512a_Rd_definitief/vild512a_v2.dbf > vild512a_v2.sql

(echo 'set session authorization osm; '; cat topicref.sql) | psql rws_vild
(echo 'set session authorization osm; '; cat vild512a_v2.sql) | psql rws_vild

(echo 'set session authorization osm; '; shp2pgsql -s 28992 -g geom -D -i -I -t 2D tmc_area.shp) | psql rws_vild
(echo 'set session authorization osm; '; shp2pgsql -s 28992 -g geom -D -i -I -t 2D tmc_line.shp) | psql rws_vild
(echo 'set session authorization osm; '; shp2pgsql -s 28992 -g geom -D -i -I -t 2D tmcpoint.shp) | psql rws_vild
```

Binary file added maps/symbols/afrit16.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added maps/symbols/afrit32.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added maps/symbols/afrit64.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 13b5ca2

Please sign in to comment.