Init

In[]:=
ClearAll["Global`*"]
In[]:=
SetDirectory[NotebookDirectory[]]
Out[]=
/wolframcloud/userfiles/c1c/c1cc6044-ccac-4dbd-bb85-c02dba39ca7c/Published

Setup geo data

In[]:=
Get["belgData.mx"];
In[]:=
Keys[belgData]
Out[]=
{LayerName,Geometry,Labels,LabeledData}
In[]:=
belgData["Labels"]
Out[]=
{CS01012020,T_SEC_NL,T_SEC_FR,T_SEC_DE,C_NIS6,T_NIS6_NL,T_NIS6_FR,CNIS5_2020,T_MUN_NL,T_MUN_FR,T_MUN_DE,C_ARRD,T_ARRD_NL,T_ARRD_FR,T_ARRD_DE,C_PROVI,T_PROVI_NL,T_PROVI_FR,T_PROVI_DE,C_REGIO,T_REGIO_NL,T_REGIO_FR,T_REGIO_DE,C_COUNTRY,NUTS1,NUTS2,NUTS3,M_AREA_HA,M_PERI_M}

Setup Geo data of Cities

​
Cities are made up from sectors (T_SEC_NL).

In[]:=
cityX=Union[Association[belgData["LabeledData"]]["CNIS5_2020"]];​​Length[cityX]
Out[]=
581

Sectors have to be put together to form city polygon.

In[]:=
belgGeo=Thread[Association[belgData["LabeledData"]]["CNIS5_2020"]->belgData["Geometry"]];
In[]:=
Length[belgGeo]
Out[]=
19794
In[]:=
result=​​Table[​​{Echo[cityN],OuterPolygon[​​RegionUnion[Flatten[Values[Select[belgGeo,Keys[#]cityN&]]]/.​​{FilledCurve[{{Line[g_]},___}]Polygon[g]}​​]]},{cityN,Take[cityX,{1,20}]}];​​
»
11001
»
11002
»
11004
»
11005
»
11007
»
11008
»
11009
»
11013
»
11016
»
11018
»
11021
»
11022
»
11023
»
11024
»
11025
»
11029
»
11030
»
11035
»
11037
»
11038
In[]:=
Graphics[result]
Out[]=
In[]:=
Select[belgGeo,Keys[#]"12005"&]
Out[]=
12005Polygon
Number of points: 150
Embedding dimension: 2
,12005Polygon
Number of points: 263
Embedding dimension: 2
,12005Polygon
Number of points: 272
Embedding dimension: 2
,12005Polygon
Number of points: 149
Embedding dimension: 2
,12005Polygon
Number of points: 249
Embedding dimension: 2
,12005Polygon
Number of points: 645
Embedding dimension: 2
,12005Polygon
Number of points: 198
Embedding dimension: 2
,12005Polygon
Number of points: 79
Embedding dimension: 2
,12005Polygon
Number of points: 184
Embedding dimension: 2
,12005Polygon
Number of points: 494
Embedding dimension: 2
,12005FilledCurve[{{Line[{{161292.,192982.},{161296.,192976.},
⋯531⋯
,{161292.,192982.}}]},{Line[{
⋯1⋯
}]}}],12005Polygon
Number of points: 104
Embedding dimension: 2
,12005Polygon
Number of points: 264
Embedding dimension: 2
,12005Polygon
Number of points: 78
Embedding dimension: 2
,12005Polygon
Number of points: 1395
Embedding dimension: 2
,12005Polygon
Number of points: 194
Embedding dimension: 2
,12005Polygon
Number of points: 211
Embedding dimension: 2
,12005Polygon
Number of points: 72
Embedding dimension: 2
,12005Polygon
Number of points: 1301
Embedding dimension: 2
,12005Polygon
Number of points: 513
Embedding dimension: 2

large output
show less
show more
show all
set size limit...