Skip to content

Commit

Permalink
HR mapfile structuur matchen met template en verwijderen oude mapfile… (
Browse files Browse the repository at this point in the history
#578)

* HR mapfile structuur matchen met template en verwijderen oude mapfile Handelsregister

* kleine aanpassing aan hoofdletters
  • Loading branch information
Doldenburgamsterdam authored Sep 12, 2024
1 parent 714be5a commit fc2bff5
Show file tree
Hide file tree
Showing 3 changed files with 547 additions and 4,089 deletions.
36 changes: 14 additions & 22 deletions private/gen_hr.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,6 @@ def slugify(s: str) -> str:
s = s.replace("ë", "e")
return re.sub(r"[^A-Za-z]+", "_", s).strip("_").lower()

def random_colorpicker ():
min = 0
max = 255
red = random.randint(min, max)
green = random.randint(min, max)
blue = random.randint(min, max)

return f'{red} {green} {blue}'


# From https://www.amsterdam.nl/stelselpedia/hr-index/catalogus-hr/domeinen/sbi-code/.
sbi = {
Expand Down Expand Up @@ -95,7 +86,7 @@ def random_colorpicker ():
("62", "Dienstverlenende activiteiten op het gebied van informatietechnologie", "#BFBFBF"),
("63", "Dienstverlenende activiteiten op het gebied van informatie", "#BF8080")
],
"K Financiële instellingen": [
"K Financiële instellingen": [
("64", "Financiële instellingen (geen verzekeringen en pensioenfondsen)", "#FF6347"),
("65", "Verzekeringen en pensioenfondsen (geen verplichte sociale verzekeringen)", "#4682B4"),
("66", "Overige financiële dienstverlening", "#9400D3")
Expand Down Expand Up @@ -151,7 +142,6 @@ def random_colorpicker ():
]
}

#header(team="BenK")

with block("MAP"):
p("NAME", "handelsregister")
Expand Down Expand Up @@ -196,6 +186,7 @@ def random_colorpicker ():
p("INCLUDE", "connection/dataservices.inc")
p("DATA", sql)
p("TYPE POINT")
p("GROUP", 'handelsregister')
# p("MINSCALEDENOM 10")
# p("MAXSCALEDENOM 9001")
p("TEMPLATE", "fooOnlyForWMSGetFeatureInfo.html")
Expand All @@ -207,32 +198,33 @@ def random_colorpicker ():
q("init=epsg:28992")

with block("METADATA"):
q("wms_title", group)
q("ows_title", group)
q("ows_group_title", 'Handelsregister')
q("gml_include_items", "all")
q("wms_enable_request", "*")
q("wms_abstract", "Handelsregister Amsterdam")
q("wms_srs", "EPSG:28992")
q("wms_format", "image/png")
q("wms_server_version", "1.1.1")

q("ows_abstract", "Handelsregister Amsterdam")
q("gml_featureid", "vestigingsnummer")
q("gml_geometries", "geometry")
q("gml_geometry_type", "point")
q("gml_types", "auto")
q("wms_include_items", "all")


for code, descr, color in sbi[group]:
slug = slugify(descr)



with block("CLASS"):
p("NAME", slug)
p("TITLE", descr)

# kleine aanpassing aan de print structuur om te voorkomen dat er '' om deze komt.
print (f'EXPRESSION ("[sbi_code_group]" eq "{code}")')
with block("STYLE"):
p("SYMBOL", "stip")
p("SIZE 16")
p("SIZE 14")
p(f"COLOR '{color}'")
p('OUTLINECOLOR 0 0 0')
p ('WIDTH 1')
p('OUTLINECOLOR 255 255 255')
p ('WIDTH 1.5')

with block("LABEL"):
p("MINSCALEDENOM 100")
Expand Down
Loading

0 comments on commit fc2bff5

Please sign in to comment.