Template:Geobox Region
From Wikipedia, the free encyclopedia
Not much changes for the common user, most field names, logic, functionality are kept. However, the Geoboxes offer more functions and versatility. There are no more specific templates for each feature but just one master template that can handle all type data. Nonetheless, the code is much more efficient and the Geoboxes render much faster (the average pre-expand size is 3-4 times smaller) and thus the switch is highly recomended.
To convert from Geobox 1 to Geobox 2 simply replace the template call, e.g. {{Geobox Settlement becomes {{Geobox|Settlement. Or there is a semi-automatic tool.
Contents |
[edit] General instructions
[edit] How to fill out
- Copy the appropriate blank template into the edited page and fill in appropriate fields. Do not re-use a template from another page.
- Do not erase empty fields, other editors might supply the missing data. The empty fields are not displayed and don't hinder anything.
[edit] General field behavior
- There exist base fields whose output can be modified or extended by adding additional fields, these always bear the name of the base field plus the name of the additional field starting with an underscore ("_"). The additional fields are not present in the blank templates, their existence is nonetheless marked in the field list of every Geobox. Following additional fields are defined for all base fields:
-
- _type - for redefining the default label, e.g. the default label for the region field is Region, adding region_type it can be changed to display Province, Department …. N.B.: keep the text short, it is always displayed on one line, if it is too long, the left column of the geobox is too wide.
-
- _note - any sort of note which is printed after the field value, it can be even a reference, though the author of Geoboxes discourages from doing so as the implementation of <ref></ref> tags is very poor. The note is printed in a bit different font, currently implemented as 90% italics.
-
- _label : puts the HTML title property on the item (the text displays on hover).
- Some fields might contain multiple values, these are not to be put in a single field and separated by commas but using numbered additional fields (e.g. for the country field there also exist country1, country2, country3 …. The additional "indexed" fields are usually not present in the blank templates.
- The fields that link to existing articles don't need to be put between [[ and ]] markup, this is added automatically if the page exists. However, the markup can be used when the text of the link is different form the link itslef, e.g. [[Amazon|Solimões]].
- All figures can be in either metric (default) or imperial (miles, feet etc) units; the Geoboxes display both, automatically calculating imperial figures from metric or metric from imperial ones. Unformated numbers (i.e. without commas) must be entered, otherwise the auto-conversion produces an error. The output is "nicely" formatted. Following additional fields can be used:
- _imperial - for input in imperial/customary units
- _round - for changing the rounding precision of auto-converison, it's the position from the decimal point to which the figure is rounded, negative values can be used when the input figure is rounded/approximate, default value is 0
- _unit - for changing the default unit, appropropriate unit abbreviation should be used; the default unit for e.g. area is usually sqaure kilometre (or square mile respectively), this can be changed to ha for hectare, acre for acre etc.
The last two additoinal fields are defined for every field using any units, if there is a set of similar fields, e.g. for area (area, area_land, area_water etc., the _round and _unit fields of the basic one are applied on all of them if they aren't specifically set)
- geobox_width - width of the Geobox in pixels (without px, just the figure), it can be used when there are more Geoboxes or images stacked below each other and the same width is desirable; not in blank templates
[edit] Specific fields
- Coordinates can be entered in two ways:
-
- using separate _d, _m, _s…fields, _s and _m can be dropped out, the coordinate display template is adjusted accordingly
- using just _d field and a decimal number, the hemispehere can be defined by either _NS, _EW fields or by using negative figures for western and southern hemisphere (these two systems mustn't be combined)
- For every location type which can be described in coordinates, there exist two additional fields
- _type (named coordinates_type for the main location), which can contain any paramteres that are passed to the mapping service, especially the scale of the map, the possible parameters are described here: Wikipedia:WikiProject_Geographical_coordinates#Parameters.
- _format (named coordinates_format for the main location) to override how the coordinates are diplayed, if the input is decimal the output is decimal too, if the input is DMS so is the output, the possible values are self-explanatory dms and dec
Both _type and _format fields can be defined for every location with coordinates separately or by the general coordinates_type and coordinates_format fields
- The map field should be used for a location map of the feature, i.e. where it is located within a country. The location map can be of three types:
-
- Self-contained location map. As in e.g. Greater Fatra.
- Semi-automated locator dot. The map field contains background map, whereas locator_x and locator_y contain relative coordinates of the locator dot (as a percent of the map width, inserted without the % symbol), this system can be used when the map is not (or cannnot be) calibrated for the automated locator dot.
- Fully automated locator dot. If coordinates of the location are defined in the Geobox and a calibrated map exists the locator dot is placed automatically based on the coordinates (map_locator field defines the appropriate map calibration). As in e.g. Ostrá. The same locator calibration can be used for all maps derived form one base map, e.g. Lysá hora and Plasy share the same calibration though the background map is different. The existing calibrations are listed here: Geobox location.
[edit] Help
- If anything doesn't work as it should, feel free to contact me, the author of the Geobox system, either on my userpage or here at the talkpage or at the appropriate Geobox talkpage. Caroig 22:40, 2 March 2007 (UTC)
[edit] Legend
field | explanation | additional fields |
---|---|---|
Name | ||
name | name of the subdivision (if left blank, article title will be used) | |
native_name | native name if different from the English one, it is printed in brackets on the same line as name | |
other_name, other_name1 … | other names, can be used for names in other languages (then preferable in the {{lang-xx|}} style) | |
category | category of the subdivision: Region, District, State, Parish ;-) etc. | category_note |
Image | ||
image | a representative photograph of the subdivision | |
image_size | photograph size in pixels (set to 256 if left blank), input just the number (i.e. without px) | |
image_caption | photograph caption | |
Symbols | ||
flag | official subdivision flag or banner | flag_type (default: Flag) flag_note |
flag_size | flag size in pixels (set to 120 if left blank), input just the number (i.e. without px) | |
symbol | official subdivision seal, shield, coat-of arms etc., | symbol_type (default: Coat-of-arms) symbol_note |
symbol_size | flag size in pixels (set to 120 if left blank), input just the number (i.e. without 'px') | |
Etymology | ||
etymology | etymology (origin) of the river name, do not enter lengthy prose, examples:
|
_type (Name origin), _label, _note |
Country etc. | ||
country | country in which the subdivision lies | country_label country_type (default: Country) |
state | state in which the subdivision lies | state_label state_type (default: State) |
region | region in which the subdivision lies | region_label region_type (default: Region) |
district | district in which the subdivision lies | district_label district_type (default: District) |
Capital and subdivisions | ||
capital | capital of the subdivision | capital_type (default: Capital) capital_note |
part_type | type of administrative subdivisons (default: Parts, can be Provinces, Districts etc.) | part_type_note, part_label |
part_count | number of administrative subdivisions | part_count_note |
city, city1 … | important/largest cities of the region | city_type (default: Largest city/Cities) city_note |
city_count | number of cities | city_note |
municipality_type | type of municipalities (default: Municipalities) | munucipality_label municipality_note |
municipality_count | number of municipalities | municipality_note municipality_note |
Geography | ||
area, area1 … | appropriate area in km² (for mi² use area_imperial, area1_imperial …) | area_type (default: Area, Area 1 …) area_unit (default: sqkm/sqmi, can be also: ha/acre) area_round (default: 0) area_note, area1_note … |
highest | highest point name | highest_note |
highest_location | descriptive location of the highest point | highest_location_note |
highest_lat_d … * | highest point latitude and longitude in degrees, minutes, seconds and hemispheres (use N/S and W/E) | highest_coordinates_note |
highest_elevation | highest point elevation in meters (for feet use highest_elevation_imperial) | highest_elevation_note |
lowest | lowest point name | lowest_note |
lowest_location | descriptive location of the lowest point | lowest_location_note |
lowest_lat_d … * | lowest point latitude and longitude in degrees, minutes, seconds and hemispheres (use N/S and W/E) | lowest_coordinates_note |
lowest_elevation | lowest point elevation in meters (for feet use lowest_elevation_imperial) | highest_elevation_note |
Population | ||
population_as_of | date to which population figures relate | population_note |
population1, population1 … | appropriate population figure, unformatted numbers must be used as they are used for calculations, they get formatted on output | population_note, population1_note |
population_density, population1_density … | appropriate population density figure in /km² (for /mi² use population_density_imperial, population_density_urban_imperial, population_density_metro_imperial), auto value can be assigned, density is then calculated from appropriate population and area fields | population_density_unit (default: sqkm/sqmi, can be also: ha/acre) population_density_round (default: 0) population_density_note, population1_density_note … |
Government | ||
established, etablished1 … | establishment/foundation date, numbered fields can contain year of status upgrade, incorporation, enlargement etc. | established_type, established1_type… (default: Established, Established 1…) established_note, established_note1 … |
leader, leader1 … | leader name | leader_type, leader1_type … (default: Leader, Leader 1…) leader_note, leader1_note … |
Various codes | ||
timezone, utc_offset | timezone name and its UTC offset | timezone_note |
timezone_DST, utc_DST_offset | summer/daylight saving timezone name and its UTC offset | timezone_DST_note |
code, code1 … | Various identification codes (ISO, postal, licence plate) | code_type, code1_type… (default: Code, Code 1…) code_note=code_note, code1_note … |
Free fields | ||
free, free1 … | free field value, can be anything, appropriate _type should be set, doesn't get automaticaly wikilinked | free_type, free1_type … free_note, fre1e_note … |
Map section | ||
map, map1 | either location map or blank map for automated loaction (only the first map) | |
map_size, map1_size | map size in pixels (set to 256 if left blank), do not enter px, just the number | |
map_caption, map1_caption | map caption | |
map_locator | appropriate Geobox location locator template for automated placement of the locator dot, NB: dot is set from capital coordinates | |
map_locator_x, map_locator_y | to be used for non-automated placement of the locator dot, these are percents of the map width | |
Website | ||
website | official website | website_note |
Footnotes | ||
footnotes | any type of footnotes | |
* Coordinates are defined as field_lat_d, field_lat_m, field_lat_s, field_lat_NS, field_long_d, field_long_m, field_long_s, field_long_WE |
[edit] Blank
Blank templates that can be copied into a new page and then filled in. There are many additional fields (not included here) which change how various fields are displayed, please consult Geobox main page first.
Metric values | Imperial values |
---|---|
{{Geobox Region <!-- *** Name section *** --> | name = | native_name = | other_name = | other_name1 = | category = <!-- *** Image *** --> | image = | image_size = | image_caption = <!-- *** Symbols *** --> | flag = | flag_size = | symbol = | symbol_size = <!-- *** Etymology *** ---> | etymology = <!-- *** Country etc. *** --> | country = | state = | region = | district = <!-- *** Parts *** --> | capital = | capital_lat_d = | capital_lat_m = | capital_lat_s = | capital_lat_NS = | capital_long_d = | capital_long_m = | capital_long_s = | capital_long_EW = | capital_elevation = | part_type = | part_count = | part = | part1 = | city = | city1 = | municipality_type = | municipality_count = <!-- *** Geography *** --> | area = | highest = | highest location = | highest_lat_d = | highest_lat_m = | highest_lat_s = | highest_lat_NS = | highest_long_d = | highest_long_m = | highest_long_s = | highest_long_EW = | highest_elevation = | lowest = | lowest_location = | lowest_lat_d = | lowest_lat_m = | lowest_lat_s = | lowest_lat_NS = | lowest_long_d = | lowest_long_m = | lowest_long_s = | lowest_long_EW = | lowest_elevation = <!-- *** Population *** --> | population_as_of = | population = | population_density = <!-- *** Government *** --> | established_type = | established = | leader = <!-- *** Various codes *** --> | timezone = | utc_offset = | timezone_DST = | utc_offset_DST = | code_type = | code = | code1_type = | code1 = <!-- *** Free fields *** --> | free_type = | free = | free1_type = | free1 = <!-- *** Map section *** --> | map = | map_size = | map_caption = | map_locator = | map_locator_x = | map_locator_y = <!-- *** Website *** --> | website = <!-- *** Footnotes *** --> | footnotes = }} |
{{Geobox Region <!-- *** Name section *** --> | name = | native_name = | other_name = | other_name1 = | category = <!-- *** Image *** --> | image = | image_size = | image_caption = <!-- *** Symbols *** --> | flag = | flag_size = | symbol = | symbol_size = <!-- *** Etymology *** ---> | etymology = <!-- *** Country etc. *** --> | country = | state = | region = | district = <!-- *** Parts *** --> | capital = | capital_lat_d = | capital_lat_m = | capital_lat_s = | capital_lat_NS = | capital_long_d = | capital_long_m = | capital_long_s = | capital_long_E = | capital_elevation_imperial = | part_type = | part_count = | part = | part1 = | city = | city1 = | municipality_type = | municipality_count = <!-- *** Geography *** --> | area_imperial = | highest = | highest location = | highest_lat_d = | highest_lat_m = | highest_lat_s = | highest_lat_NS = | highest_long_d = | highest_long_m = | highest_long_s = | highest_long_EW = | highest_elevation_imperial = | lowest = | lowest_location = | lowest_lat_d = | lowest_lat_m = | lowest_lat_s = | lowest_lat_NS = | lowest_long_d = | lowest_long_m = | lowest_long_s = | lowest_long_EW = | lowest_elevation_imperial = <!-- *** Population *** --> | population_as_of = | population = | population_density_imperial = <!-- *** Government *** --> | established_type = | established = | leader = <!-- *** Various codes *** --> | timezone = | utc_offset = | timezone_DST = | utc_offset_DST = | code_type = | code = | code1_type = | code1 = <!-- *** Free fields *** --> | free_type = | free = | free1_type = | free1 = <!-- *** Map section *** --> | map = | map_size = | map_caption = | map_locator = | map_locator_x = | map_locator_y = <!-- *** Website *** --> | website = <!-- *** Footnotes *** --> | footnotes = }} |