User:Lokal Profil/SWE-Map Documentation

The maps in the SWE-Map series has been designed as a set of compatible source files of different subdivisions of Sweden. They were all constructed with further derivative works in mind. All of the maps (except that in Alternative map, below) are designed so that they may be superimposed. This can either be done by merging the two files in an SVG-editing program such as Inkscape or by copy a division-group from one svg file directly into that of another division svg file.

For each map each unit (e.g. a county) has been designed to be made up by one svg object, e.g. all the islands of Stockholm County are merged into one object. This means that the whole of a unit can be coloured with one change. Each unit is tagged both by an individual id and an individual CSS class, in most cases these have the same names however since there are exceptions to this rule you should refer to the table below. The id/css names use the official code if one exists or the unit name when there is no code. Note that all such names have the letters åäö replaced by aao.

All units within a subdivision are in turned grouped with the group given an id and CSS class. This allows the default colour of the units to be changed. Some files also include a borders object, also with an id and CSS class. This is a simplified object of all the borders between the units and intended to be used as a guide to the eye when different subdivisions are combined.

All the maps use the projection RT90 2,5gonV [1]. They are all released as {{Cc-by-sa-2.5}} and based on a map from Statistics Sweden (SCB) for which the permission ticket may be found here (OTRS account needed).

Editing

edit

The maps are all designed to be editable in two different ways. Using CSS classes (best done using a plain text editor) or using id's (best done using Inkscape or similar). The different methods have different benefits. The CSS one ensures that derivatives can be made as easily as for the original map, that the filesize remains small and that the file is easily editable using scripts. The Inkscape method (or Id method) is simply very easy to use and does not require any confrontation with the code.

Open the svg file in a text editor. The editor should be one which doesn't add any own formatting so something like notepad is recommended. navigate down to the <style type='text/css' id='style_css_sheet'> tag. Here you should see the CSS class for the default colours and the borders class (where available). To add behaviour for individual classes simply add these before the </style> line. Class names are prefixed by a full stop and multiple classes are comma separated. Add any formatting enclosed by { and } after the class.

ecample

edit

The code below added to SWE-Map Förvaltningsrätter.svg gives an image which looks like SWE-Map Förvaltningsrätter-Kammarrätter.svg.

  <style type="text/css" id="style_css_sheet">
    .forvaltningsratt {fill-rule:evenodd; stroke:black; stroke-width:0.40001;}
    .forvaltning-Karlstad, .forvaltning-Goteborg, .forvaltning-Malmo { fill:#99d9ea;}
    .forvaltning-Stockholm, .forvaltning-Uppsala { fill:#ffc20e;}
    .forvaltning-Jonkoping, .forvaltning-Vaxjo, .forvaltning-Linkoping { fill:#ed1c24;}
    .forvaltning-Falun, .forvaltning-Harnosand, .forvaltning-Umea, .forvaltning-Lulea { fill:#22b14c;}
  </style>

Inkscape etc.

edit

To use the id's open the map in Inkscape and then choose Edit → Find. In the ID field then enter the id which you want to colour. Press find and the object corresponding to the id is highlighted.

Available maps

edit
Base map Division main class border class? individual class
(example)
individual id
(example)
Illustrative map
Not for derivatives
Kommuner
 

Svenska: Kommuner
.kommun N/A ."k"+Kommunkod
(.k2521)
Kommunkod
(2521)
 
Län
 
English: Counties

Svenska: Län
.lan .lan-border .Länsbokstav
ISO 3166-2:SE (Last one/two letters)
(.C)
Länsbokstav
(C)
 
Län-kommuner, Stockholm magnified
 
English: Municipalities and county borders with Stockholm County magnified.

Svenska: Kommuner med länsgränser och Stockholms län förstorat.
.kommun .lan-border ."k"+Kommunkod
(.k2521)
Kommunkod
(2521)
Rike
 
English: Nation with major lakes.
National borders (land/sea) as separate objects

Svenska: Rike med större sjöar.
Riksgräns (land/hav) som separata objekt
.national .national-borders ."national-borders-"+Type
(.national-borders-land)
"national-borders-"+Type
(national-borders-land)
 
Domsagor
 
English: District courts

.domsaga N/A ."dom-"+Name
(.dom-Varmland)
"dom-"+Name
(dom-Varmland)
 
Förvaltningsrätter
 

.forvaltningsratt N/A ."forvaltning-"+Name
(.forvaltning-Goteborg)
"forvaltning-"+Name
(forvaltning-Goteborg)
 
Kammarrätter
 

Svenska: Kammarrätter
.kammarratt .kammarratt-border ."kammar-"+Name
(.kammar-Goteborg)
"kammar-"+Name
(kammar-Goteborg)
 
Hovrätter
 

Svenska: Hovrätter
.hovratt .hovratt-border ."hov-"+Name
(.hov-Skane-och-Blekinge)
"hov-"+Name
(hov-Skane-och-Blekinge)
Sjukvårdsregioner
 
English: Health care regions

.sjukvardsregion .sjukvardsregion-border ."sjukvard-"+Name
(.sjukvard-Uppsala-Orebro)
Name
(Uppsala-Orebro)
 
NUTS1
 
English: Lands (NUTS 1)

Svenska: Landsdelar (NUTS 1)
.NUTS1 .NUTS1-border .NUTS 1 code
(.SE1)
NUTS 1 code
(SE1)
 
Riksområde
 
English: National areas (NUTS 2)

Svenska: Riksområde (NUTS 2)
.Riksomrade .Riksomrade-border .NUTS 2 code
(.SE11)
NUTS 2 code
(SE11)
 
A-Region
 

Svenska: A-Region/Arbetsmarknadsregion
.aRegion N/A ."aReg-"+region code
(.aReg-09)
"aReg-"+region code
(aReg-09)
 
LA-Region
 

Svenska: LA-Region/Lokal arbetsmarknadsregion
.laRegion N/A ."laReg-"+region code
(.laReg-9)
"laReg-"+region code
(laReg-9)
 
FA-Region
 

Svenska: FA-Region/Funktionella analysregion
.faRegion N/A ."faReg-"+region code
(.faReg-9)
"faReg-"+region code
(faReg-9)
 
Trafikverksregioner
 
English: Transport Administration regions

Svenska: Trafikverksregioner
.Trafikverksregion .Trafikverksregion-border ."TrafikReg-"+Name
(.TrafikReg-Ost)
"TrafikReg-"+Name
(TrafikReg-Ost)
 
Valkretsar
 
English: Electoral districts

Svenska: Valkretsar
.valkrets N/A ."valkrets-"+Name
(.valkrets-Malmo-kommun)
"valkrets-"+Name
(valkrets-Malmo-kommun)
 
Landsarkiv
 
English: Archive districts

Svenska: Landsarkiv
.landsarkiv .landsarkiv-border .Name
(.Goteborg)
Name
(Goteborg)
 
Stift
 
English: Dioceses of the Church of Sweden

.stift .stift-border .Name
(.Harnosand)
Name
(Harnosand)
 

Former subdivisions

edit
Base map Division main class border class? individual class
(example)
individual id
(example)
Illustrative map
Not for derivatives
Länsrätter
 

Svenska: Länsrätter
.lansratt N/A ."lansratt-"+Name
(.lansratt-Ostergotland)
"lansratt-"+Name
(lansratt-Ostergotland)
Kammarrätter, pre 2010
 

Svenska: Kammarrätter, före 2010
.kammarratt .kammarratt-border ."kammar-"+Name
(.kammar-Goteborg)
"kammar-"+Name
(kammar-Goteborg)
Vägverksregioner
 
English: Road Administration regions

Svenska: Vägverksregioner
.Vagverksregion .Vagverksregion-border ."VagReg-"+Name
(.VagReg-Malardalen)
"VagReg-"+Name
(VagReg-Malardalen)
 
Län,1996
 
English: County borders: 1967-1996
See also SWE-Map Län,1997.svg for borders 1997-1997.

Svenska: Länsgränser 1967-1996
Se även SWE-Map Län,1997.svg för gränser 1997-1997.
.lan N/A .Länsbokstav
ISO 3166-2:SE (Last one/two letters)
(.C)
Länsbokstav
(C)

Partially compatible

edit

Below are partially compatible maps. They were constructed in a similar manor but relies on SWE-Map Kommuner2007.svg instead of SWE-Map Kommuner.svg and so cannot be fully overlaid on the above maps.

Needed codes

edit