The KGeography Handbook

The KGeography Handbook

Anne-Marie Mahfouf

Kushal Das

Revision 0.5.9-10 (2009-01-25)

KGeography is a geography learning tool for 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


Chapter 1. Introduction

Chapter 1. Introduction

KGeography is a geography learning tool for 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).

Chapter 2. Quick Start to KGeography

Chapter 2. Quick Start to KGeography

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


Here's a screenshot of KGeography at first start

Here we choose Canada


Canada is chosen

And KGeography main window appears with the map of Canada:


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

Explore Map: a left mouse button 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

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


How many questions

Then you are asked to click on a specific province:


Click on a province

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


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

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

And the results are displayed when the test is finished:


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

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

Chapter 3. Using KGeography

Chapter 3. Using KGeography

KGeography displays information about some countries and tests you about those information.


Screenshot

More KGeography features

Another feature of KGeography is the possibility of zoom on a map.


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 right mouse button 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 left mouse button. The Automatic Zoom feature will make the map as big as possible.

Chapter 4. How to make maps

Chapter 4. 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.

Description file

Description file

The description file is needed and its file extension is .kgm. It should begin with <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, e.g.europe.png”.

  • <name> and </name>: the name of map, e.g.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, e.g.Albania”.

  • <capital> and </capital>: the name of the capital of the division, e.g.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, e.g.albania.png”. This tag is optional. Not needed for the divisions whose <ignore> tag is set to yes.

  • <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.

Tip

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.

Important

All names (capitals and divisions) must be in English.

Map file

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

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.

How to test

How to test

Before sending your map to Albert , 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 $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 of opening your map from inside KGeography.

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

Tip

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

Non political maps

Is it possible to do non-political maps? Yes, it is!


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.

Chapter 5. Command Reference

Chapter 5. Command Reference

The main KGeography window

The File Menu

File->Open Map... (Ctrl+O)

Open the choose map dialog

File->Quit (Ctrl+Q)

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

View->Automatic Zoom

Sets the map to automatic zoom using as much space as possible

View->Move

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

The Settings Menu

Settings->Show Toolbar

Show/Hide the KGeography toolbar.

Settings->Configure Shortcuts...

Configure key shortcuts for KGeography.

Settings->Configure Toolbars...

Configure the KGeography toolbar.

The Help Menu

KGeography has a default KDE Help as described below, with two additionional 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.

The default KDE Help entries are:

Help->KGeography Handbook (F1)

Invokes the KDE Help system starting at the KGeography help pages. (this document).

Help->What's This? (Shift+F1)

Changes the mouse cursor to a combination arrow and question mark. Clicking on items within KGeography will open a help window (if one exists for the particular item) explaining the item's function.

Help->Report Bug...

Opens the Bug report dialog where you can report a bug or request a “wishlist” feature.

Help->Switch Application Language...

Opens a dialog where you can edit the Primary language and Fallback language for this application.

Help->About KGeography

This will display version and author information.

Help->About KDE

This displays the KDE version and other basic information.

Chapter 6. Credits and License

Chapter 6. Credits and License

KGeography

Program copyright 2004-2008 Albert Astals Cid

Documentation Copyright (c) 2005 Anne-Marie Mahfouf 2008 Kushal Das

This documentation is licensed under the terms of the GNU Free Documentation License.

This program is licensed under the terms of the GNU General Public License.

Appendix A. Installation

Appendix A. Installation

How to obtain KGeography

KGeography is part of the KDE project http://www.kde.org/.

KGeography can be found in the kdeedu package on ftp://ftp.kde.org/pub/kde/, the main FTP site of the KDE project.

Compilation and Installation

Compilation and Installation

For detailed information on how to compile and install KDE applications see Building KDE4 From Source

Since KDE uses cmake you should have no trouble compiling it. Should you run into problems please report them to the KDE mailing lists.