# The &kgeography; Handbook

Anne-Marie
Mahfouf
&Anne-Marie.Mahfouf.mail;
Kushal
Das
kushaldas@gmail.com
2005
&Anne-Marie.Mahfouf;
2008
Kushal Das
&FDLNotice;
2020-12-22
Applications 20.12

&kgeography; is a geography learning tool by &kde;. Right now it has seven usage modes:

- Browse the maps clicking in a map division to see its name, capital and flag

- The game tells you a map division name and you have to click on it

- The game tells you a capital and you have to guess the division it belongs to

- The game tells you a division and you have to guess its capital

- The game shows you a map division flag and you have to guess its name

- The game tells you a map division name and you have to guess its flag

- The game shows an empty map and you have to place divisions on it one by one

KDE
kdeedu
KGeography
geography
maps
countries

## Introduction

&kgeography; is a geography learning tool by &kde;. It allows you to learn about the political divisions of some countries (divisions, capitals of those divisions and their associated flags if there are some).

## Quick Start to &kgeography;

When you run &kgeography; for the first time, it first asks you to choose a map to start with.

You can filter the map list using Filter Maps text field. Just enter a few first letters of the map name to narrow down the list to a few matches.

Here's a screenshot of &kgeography; at first start
Here's a screenshot of &kgeography; at first start

Here we choose Canada Canada is chosen Canada is chosen

And &kgeography; main window appears with the map of Canada: &kgeography; main window &kgeography; main window

You can then choose what type of learning or testing you want to do by looking at the menu on the left: &kgeography; menu &kgeography; menu

Explore Map: a &LMB; click on an area of the map will display information about that area, if you click on the small Info icon on the popmap, it will open the wikipedia page for that division in the system's default browser: Browse the map Browse the map

Location of Provinces or Territories: you are first asked how many questions you want. How many questions How many questions

Then you are asked to click on a specific province: Click on a province Click on a province

When you finish all the questions, a result dialog is shown with your correct and uncorrect answers: Your results Your results

Place Provinces or Territories in the Map: the cursor takes the shape of a province and you have to place it in the map: Place a division in the map Place a division in the map

Provinces or Territories by Capital: you are asked to find the name of a province among a choice of 4 given its capital: Guess a division from its capital Guess a division from its capital

And the results are displayed when the test is finished: Your results Your results

Capitals of Provinces and Territories: you have a capital and four province names and you must choose the correct one. As before, at the end a result dialog is shown.

Provinces or Territories by Flag: a flag is shown and you must find the province it belongs to. the flag question the flag question

Flags of Provinces and Territories: a province name is given and you must find the correct flag among four. match the flag with the province match the flag with the province

## Using &kgeography;

&kgeography; displays information about some countries and tests you about those information.

Here's a screenshot of &kgeography; Screenshot

### More &kgeography; features

Another feature of &kgeography; is the possibility of zoom on a map. Zoom Zoom You can click the Zoom button and then draw a rectangle to zoom in a part of the map. While in zoom mode, you can press &RMB; to go back to the original map size (the Original Size action has the same effect). Use the scroll bars, the arrow keys or the mouse wheel to move around the zoomed map or use the Move action that will allow you to drag the map using &LMB;. The Automatic Zoom feature will make the map as big as possible.

## How to make maps

A map in &kgeography; is made by two files, one is the image of the map and the other one is its description.

### Helper tool

You can find here a tool (made by Yann Verley) which helped him with the map of France. To find out its usage, simply execute it and read the help message. It basically creates the `.kgm` file from a plain text file and creates a file with the colors it has assigned to each division, so you can fill the map according to them.

There is another tool colorchecker.py written by Albert Astals Cid. You need PyQt4 to run this. Just run this with the `.kgm` filename as argument (you also need the `.png` file of the map in the same folder). This will tell you if any pixel on the map has a different color which is not defined in the `.kgm` (description) file.

Please read also the tutorial How to add maps on the &kgeography; website.

### Description file

The description file is needed and its file extension is `.kgm`. It should begin with `?xml version="1.0" encoding="utf-8"`, then `!DOCTYPE kgeographyMap`, followed by `map` and end with `map`.

Inside of those tags there should be:

- `mapFile` and `mapFile`: the name of the file (without any path) containing the map image, &eg; `europe.png`.

- `name` and `name`: the name of map, &eg; `Europe`.

- `divisionsName` and `divisionsName`: the general name of divisions in this map, that is, Provinces, States, Countries, &etc;

- A `division` and `division` for each division in the map.

Each division has these tags:

- `name` and `name`: the name of the division, &eg; `Albania`.

- `capital` and `capital`: the name of the capital of the division, &eg; `Tirana`.

- `ignore` and `ignore`: can be set to `yes`, `allowClickMode`, `allowClickFlagMode` and `no`. If this tag is set to `yes` then the division will be ignored when asking for divisions in that map. It is then as if this division does not exist in &kgeography; quiz modes. If this tag is set to `allowClickMode` then &kgeography; will ask for the division in the Location of ... mode but not in other quiz modes. If this tag is set to `allowClickFlagMode` then &kgeography; will ask for the division in the Location of ... mode and in the flag related quizes but not in other quiz modes. Setting this tag to `no` means the division will appear in all modes (browse and quizzes). This tag is optional and when there is no `ignore` tag that means as it is set to `no`. For example `Algeria` has this tag set to `yes` in the `Europe` map which means that `Algeria` will not be part of any quiz in the `Europe` map.

- `flag` and `flag`: the file (without any path) containing the flag of the division, &eg; `albania.png`. This tag is optional. Not needed for the divisions whose `ignore` tag is set to `yes`.

- `blurredflag` and `blurredflag`: the file (without any path) containing the blurred flag of the division, &eg; `blurred_albania.png`. This tag is optional. It should be used in situations where the flag has the name of the division to which it belongs written on it. This can cause the flag guessing games to become too easy, and as such submission of the flags with the text blurred out is encouraged.

- `color` and `color`: the color the division has in the map.

- `falseCapital` and `falseCapital`: There can be any number of `falseCapital` pairs, they are used to provide a list of false answers to the capital question instead of choosing the false answers amongst the other divisions capitals.

The color is defined using three 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 the `ignore` tag set to `yes`. Don't forget `not to set` color for any `Frontier` 0,0,0 in RGB. Please make it something like 1,1,1 so that a border outline comes while placing any division on the map.

All names (capitals and divisions) 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 political world map, 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 the flag files. 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 the Sodipodi flags collection.

As noted previously, we encourage you to provide blurred flag files for flags that have the division written on them. The same requirements apply to the blurred flag files as to the regular flag files. While there is no prescribed naming notation for the blurred files, we recommend saving these down with the name of the original flag prefixed with `blurred_`, &eg; `blurred_albania.png`

### How to test

Before sending your map to Albert &Albert.Astals.Cid.mail;, you should test it to see it has no errors. To achieve that, you have to do the following:

- Put the map description and map image file in `$`XDG_DATA_HOME`/share/apps/kgeography/`

- Put the flag PNG files (if any) in `$`XDG_DATA_HOME`/share/apps/kgeography/flags/`

Once that has been done you should be able of opening your map from inside &kgeography;.

If you don't know which is your `$`XDG_DATA_HOME``, type ``qtpaths` `--paths HomeLocation`` in a shell.

Use the colorchecker.py tool from the helper tools to check if any extra color left on the map which is not defined on the `.kgm` file.

### Non political maps

Is it possible to do non-political maps? Yes, it is! Example of how to create a non political map Example of how to create a non political map

Of course, the division concept can be extended to a river or a mountain. During the creation 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.

## Command Reference

### The main &kgeography; window

#### The File Menu

&Ctrl;O File Open Map...

  Open the choose map dialog. If you type quickly enough the first letters of the map you look for will select the first map that matches.

&Ctrl;Q File Quit

  Quits &kgeography;.

#### The View Menu

View Zoom

  Goes in zoom mode, then draw a rectangle to zoom in a part of the map.

View Original Size

  Sets the map back to its original size as defined in the map file. A &RMB; click in zoomed mode performs the same action.

View Automatic Zoom

  Sets the map to automatic zoom using as much space as possible when resizing the &kgeography; window.

View Move

  Moves the current map. This item is only enabled, if you have zoomed into the map.

#### The Settings Menu

&kgeography; has the common &kde; Settings menu items, for more information read the section about the Settings Menu of the &kde; Fundamentals.

#### The Help Menu

&kgeography; has a default &kde; Help menu as described in the &kde; Fundamentals with two additional entries:

Help Disclaimer

  Displays a disclaimer about the accuracy of maps, flags and translations used by &kgeography;.

Help Map author

  Displays the name of author who created the current map.

## Configuration

Question Alignment

  Determines the position of the questions in the window, default is Top-left.

Wait for Validation

  If enabled the user will have to press Accept after choosing an answer.

Focus follows Mouse

  If enabled pressing &Space; will trigger the button under the mouse pointer.

Map divisions colors

  You can choose if you always want to keep the same colors (default) or if you want to use random colors: with this option random colors are assigned to the divisions in the map. This helps the user to focus and learn the division shapes and not the division colors.

## Credits and License

&kgeography;

Program copyright 2004-2008 Albert Astals Cid &Albert.Astals.Cid.mail;

Documentation Copyright © 2005 &Anne-Marie.Mahfouf; &Anne-Marie.Mahfouf.mail; 2008 Kushal Das kushaldas@gmail.com

&underFDL; &underGPL;

&documentation.index;