KGeography/Making Maps/da: Difference between revisions

From KDE UserBase Wiki
(Importing a new version from external source)
(Importing a new version from external source)
Line 24: Line 24:
* <nowiki><color></nowiki> og <nowiki></color></nowiki>: inddelingens farve i dette kort.
* <nowiki><color></nowiki> og <nowiki></color></nowiki>: inddelingens farve i dette kort.


The color is defined using three tags:
Farven defineres ved brug af tre tags:


* <nowiki><red></nowiki> and <nowiki></red></nowiki>: red component of the color. Valid values are between 0 and 255.
* <nowiki><red></nowiki> and <nowiki></red></nowiki>: red component of the color. Valid values are between 0 and 255.

Revision as of 06:36, 14 March 2011

Other languages:

Fremstilling af kort

Et kort i KGeography består af mindst to filer; en med billedet af kortet og en, som indeholder dets beskrivelse.

Hjælpeværktøjer

Her kan du finde et hjælpeværktøj lavet af Yann Verley til at hjælpe med kort. For at finde ud af, hvordan man bruger det skal du bare starte programmet og se hjælpemeddelelserne, men grundlæggende laver det en kgm-fil ud fra ren tekst og en fil med de farver, som det har tildelt til hver inddeling, sådan at du kan udfylde kortet med dem.

Beskrivelsesfilen

Dens filbeskrivelse er .kgm. Den skal starte med <map> og slutte med </map>. Imellem dem skal følgende tags findes:

  • <mapFile> og </mapFile>: filnavnet på billedet af kortet, fx europe.png
  • <name> og </name>: kortets navn, fx Europa
  • A <division> og </division> for hver inddeling af kortet.

Hver inddeling har disse tags:

  • <name> og </name>: inddelingens navn, fx Albania
  • <capital> og </capital>: hovedstaden i inddeligen, fx Tirana
  • <ignore> og </ignore>: må være "yes", hvis inddelingen skal ignoreres, sår der spørges om inddelinger i dette kort. Dette tag er valgfrit, fx har Algeriet dette tag sat til "yes" i Europa-kortet
  • <flag> og </flag>: filen, som indeholder inddelingens flag. Dette tag er valgfrit og ikke nødvendigt for inddelinger, som har "yse" i sit "ignore"-tag. Eksempel: albania.png
  • <color> og </color>: inddelingens farve i dette kort.

Farven defineres ved brug af tre tags:

  • <red> and </red>: red component of the color. Valid values are between 0 and 255.
  • <green> and </green>: green component of the color. Valid values are between 0 and 255.
  • <blue> and </blue>: blue component of the color. Valid values are between 0 and 255.

It is convenient to create 2 or 3 false divisions like Water, Frontier and Coast and set them with ignore=yes.

Important: All names (capital and division) must be in English.

Map file

The map file is quite simple but laborious to create. It has to be in PNG format. You can find some maps to transform at CIA Reference Maps. If no map fits your needs you can download the world pdf, take a screenshot of it and work from it. Each division in the map should have one and only one color. To achieve this you can use image processing programs like The Gimp and Kolourpaint.

Flags

If you have used the flag tag you should provide a flag file. They have to be in PNG format and better if they are 300x200 pixels and you provide a SVG file for it. To obtain SVG flags of almost all countries in the world and some other divisions you can consult Sodipodi flags collection.

How to test

Before sending your map to me you should test to make sure it does not have errors. To do it you have to do the following:

  • Put the map description and map image file in $(KDEDIR)/share/apps/kgeography/
  • Put the flag PNG files (if any) in $(KDEDIR)/share/apps/kgeography/flags

Once that has been done you should be able to open your map from inside KGeography.

If you don't know which is your $(KDEDIR) type kde4-config --prefix in a shell.

Non political maps

Is it possible to do non-political maps?
Of course, the division concept can be extended to a river or a mountain. In the making of the map you should keep in mind that most times the river or mountain will be too small that you should provide an additional clicking area.
In this example the river would have the maroon area and color <20,76,34> as its identifier.