KGeography/Making Maps/uk: Difference between revisions

From KDE Wiki Sandbox
(Created page with "* <nowiki><mapFile></nowiki> і <nowiki></mapFile></nowiki>: назва файла, де міститься зображення карти, наприклад, europe.png * <no...")
(Created page with "* <nowiki><name></nowiki> і <nowiki></name></nowiki>: назва об’єкта на карті, наприклад, Albania * <nowiki><capital></nowiki> і <nowiki></capital>...")
Line 18: Line 18:
Для кожного з елементів карти передбачено такі теґи:
Для кожного з елементів карти передбачено такі теґи:


* <nowiki><name></nowiki> and <nowiki></name></nowiki>: the name of the division. e.g: Albania
* <nowiki><name></nowiki> і <nowiki></name></nowiki>: назва об’єкта на карті, наприклад, Albania
* <nowiki><capital></nowiki> and <nowiki></capital></nowiki>: the name of the capital of the division. e.g: Tirana
* <nowiki><capital></nowiki> і <nowiki></capital></nowiki>: назва столиці об’єкта, наприклад, Tirana
* <nowiki><ignore></nowiki> and <nowiki></ignore></nowiki>: must be yes if the division should be ignored when asking for divisions in that map. This tag is optional e.g: Algeria has this tag set to yes in Europe map
* <nowiki><ignore></nowiki> і <nowiki></ignore></nowiki>: містить «yes», якщо об’єкт слід ігнорувати під час формування запитань щодо карти. Цей теґ не є обов’язковим. Приклад: запис «Algeria» (Алжир) має цей теґ для карти Європи.
* <nowiki><flag></nowiki> and <nowiki></flag></nowiki>: the file containing the flag of the division. This tag is optional. Not needed for the divisions whose ignore tag is set to yes e.g: albania.png
* <nowiki><flag></nowiki> і <nowiki></flag></nowiki>: файл, у якому міститься зображення прапору об’єкта. Цей теґ є необов’язковим. Непотрібний для об’єктів для яких вказано теґ ігнорування. Приклад: albania.png
* <nowiki><color></nowiki> and <nowiki></color></nowiki>: the color the division has in the map.
* <nowiki><color></nowiki> і <nowiki></color></nowiki>: колір об’єкта на карті.


The color is defined using three tags:
The color is defined using three tags:

Revision as of 10:43, 11 March 2011

Other languages:

Створення карт

Карта KGeography складається з принаймні двох файлів: файла зображення карти та файла опису карти.

Допоміжна програма

Тут ви знайдете програму, створену Yann Verley. Ця програма допомогла йому у створенні карт. Щоб ознайомитися з довідкою щодо використання цієї програми, просто запустіть її. Якщо коротко, програма створює файл .kgm на основі текстового файла і створює файл з характеристиками кольорів, які призначено до кожної області, щоб вам легше було заповнювати карту відповідно до вказаних кольорів.

Файл опису

Назва такого файла має суфікс .kgm. Дані файла мають починатися з теґу <map> і завершуватися теґом </map>. Між цими двома теґами мають бути такі теґи:

  • <mapFile> і </mapFile>: назва файла, де міститься зображення карти, наприклад, europe.png
  • <name> і </name>: назва карти, наприклад, Europe
  • <division> і </division> для кожного з об’єктів на карті.

Для кожного з елементів карти передбачено такі теґи:

  • <name> і </name>: назва об’єкта на карті, наприклад, Albania
  • <capital> і </capital>: назва столиці об’єкта, наприклад, Tirana
  • <ignore> і </ignore>: містить «yes», якщо об’єкт слід ігнорувати під час формування запитань щодо карти. Цей теґ не є обов’язковим. Приклад: запис «Algeria» (Алжир) має цей теґ для карти Європи.
  • <flag> і </flag>: файл, у якому міститься зображення прапору об’єкта. Цей теґ є необов’язковим. Непотрібний для об’єктів для яких вказано теґ ігнорування. Приклад: albania.png
  • <color> і </color>: колір об’єкта на карті.

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 ignore=yes.

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

Файл карти

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.

Прапори

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.

Перевірка карти у дії

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.

Неполітичні карти

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.