Géolocalisation is the (fr) version of tool called Location map (see en:Template:Location map) on several wikipedia(s). In fact, this is an improved version.

A quick tour modifier

There is three main ways to use géolocalisation in an article :

Syntax et explanations Result

géolocalisation in an infobox :

{{Infobox Montagne
| nom=Savalan
| image=Sabalan1.JPG
| légende=Le Savalan vu à 4 100 mètres d'altitude.
| altitude=4811
| massif=[[Elbourz]]
| latitude=38.25
| longitude=47.92
| ref coord=
| pays={{Iran}}
| type=Volcan gris
| activité=Inconnue
| éruption=Inconnue
| identifiant=0302-002
| observatoire=Aucun
| géolocalisation=Iran/Russie
}}

Savalan
 
Le Savalan vu à 4 100 mètres d'altitude.
Géographie
Altitude 4 811 m
Massif Elbourz
Coordonnées 38° 15′ nord, 47° 55′ est
Administration
Pays   Iran
Géologie
Type Volcan gris
Activité Inconnue
Dernière éruption Inconnue
Code GVP 0302-002
Observatoire Aucun
Géolocalisation sur la carte : Iran
 
 
Géolocalisation sur la carte : Russie
 
 

géolocalisation with {{Carte avec géolocalisation}} :

{{Carte avec géolocalisation
|Italie|45.00765|10.0366|Sant'Agata
|largeur=200|float=right
|légende=Les "terres" verdiennes :
[http://maps.google.com/maps<!--
-->?ll=45.00765,10.0366&spn=0.1,0.1&q=45.00765,10.0366 <!--
-->Localisation de la Casa Verdi à Sant'Agata].
}}
 
 

Les "terres" verdiennes :

Localisation de la Casa Verdi à Sant'Agata.

Create a completed map (carte complétée)

{{Début de carte}}<!--
-->[[Fichier:{{Géolocalisation/Bretagne
|image}}|400px|Carte de Bretagne]]
{{G|Bretagne|48.3|-2.77|Côtes-d'Armor|Région}}
{{G|Bretagne|48.35|-4|Finistère|Région}}
{{G|Bretagne|48.25|-1.7|Ille-et-Vilaine|Région}}
{{G|Bretagne|47.95|-2.77|Morbihan|Région}}

{{G|Bretagne|47.32|-3.18|Belle-Île-en-Mer{{!}}Belle-Île-<br/>
en-Mer|Ile|20|n}}
{{G|Bretagne|48.46|-5.09|Ouessant|Ile|20|ne}}
{{G|Bretagne|47.59|-2.79|Golfe du Morbihan|Mer|30|se}}

{{G|Bretagne|48.52|-2.77|Saint-Brieuc|Ville|3|s}}
{{G|Bretagne|47.99|-4.11|Quimper|Ville|3|s}}
{{G|Bretagne|48.39|-4.50|Brest|Ville|4|n}}
{{G|Bretagne|48.11|-1.68|Rennes|Ville|2|s}}
{{G|Bretagne|48.66|-2.01|Saint-Malo|Ville|4|n}}
{{G|Bretagne|47.66|-2.76|Vannes|Ville|3|n}}
{{Fin de carte}}

« {{G|Bretagne|47.66|-2.76|Vannes|Ville|3|n}} » is a command which means : « (Geo)locates on map of Bretagne » at location (47.66, -2.76), Vannes which is a city (i.e., (fr) Ville) with administrative status 4. » « n » means « place the toponyme "Vannes" above (north) the pictogram ».

Enhancements modifier

Géolocalisation has several assets :

{{Carte/Afrique}} using {{Géolocalisation/Projection azimutale équivalente de Lambert}} before optimization
 
Méridien central
 
(0, 15) d=0.99995849932938
{{Carte/Canada}} using {{Géolocalisation/Projection conique conforme de Lambert}} before optimization
{{Carte/États-Unis}} with sub maps
and so on
{{Géolocalisation/Russie}}{{Géolocalisation/Projection sinusoïdale}}{{Géolocalisation/Antarctique}} • ...
  • different operations are independently performed by different sets of templates, in a more flexible way.
  • it provides a large set of points(/dots?)
  • there is many documentations pages and tutorials[1]

How does it work ? modifier

The simplest use of géolocalisation requires several ingredients[2] :

Syntax and explanations Result
{{Début de carte}}[[Fichier:{{Géolocalisation/France|image}}|200px]]
{{G|France|47.323889|05.042778|Dijon|Ville|14}}
{{Fin de carte}}
  1. géolocalisation commands are systematically set beetwen templates {{Début de carte}} (beginning of map) and {{Fin de carte}} (end of map).
  2. Of course, there is a background image.
  3. Finally, one need one (or more) geolocation template itself ({{G}} is the most often used) :
    But this template requires two additional ingredients :
    1. A map parameterization template ((fr) modèle de paramétrage de carte) : In this example, this parameter is « France ». Therefore, {{Géolocalisation/France}} is used to determinate where to place the spot. It is also used to get the image to used.
    2. A point template ((fr) modèle de point) : In this example, this parameter is « Ville » ((en) City). Therefore, {{Point/Ville}} is used to draw the point.

Code of {{G}} is very simple.

{{G|France|47.323889|05.042778|Dijon|Ville|14}}

is a shortcut for

{{Point/Ville
|{{Géolocalisation/France|y|47.323889|05.042778}}
|{{Géolocalisation/France|x|47.323889|05.042778}}
|Dijon|14}}

A big choice of point templates allows us to use a pictogram which suits to what is located.

"Géolocalisation" versus "Location map" modifier

The main differences modifier

(fr) {{G}} versus (en) {{Location map}}.

The main difference is that french version of a map parameterization template does not only contain data about projection, but projection itself. It contains 2 formula X(latitude,longitude) ; Y(latitude,longitude) (where units of (X,Y) are no longer[3] pixels "px" but percentage "%"). So, it allows any kind of projections. It's more efficient, only 2 calls of the map parameterization template are necessary to place a point ("Location map" template requires many more calls).

The second big difference, is that "Location map" draws the point by its own way. {{G}} uses the point function it receives.

The last difference, "Location map" only placs 1 point ; {{G}} too ; but {{G}} can be called several times on a same map (see example above) to create templates called : « Modèle de carte complétée »


Futhermore, french version of a map parameterization template contains more informations.

Map parameterization templates modifier

{{Géolocalisation/Italie}} versus {{Location map Italy}}
Code before optimization (fr) Code after optimization (fr) Code (en)
{{Géolocalisation/Projection équirectangulaire
|{{{1}}}|{{{2}}}|{{{3}}}
|top=47.4
|bottom=35.3
|left=6.2
|right=19
|image={{#switch: {{{2|}}}
|relief=Italy_relief_location_map.jpg
|#default=Italy_location_map.svg
}}
|iwidth=1034
|iheight=1299
|name=Italie
|zone=pays
|geo=-108
}}<noinclude>
{{Documentation paramétrage de carte}}
<!--...-->
</noinclude>
{{#switch:{{{1}}}
|y={{#expr: ({{{2}}}-(47.4))*-8.2644628099174}}
|x={{#expr: ({{{3}}}-(6.2))*7.8125}}
|image={{#switch: {{{2|}}}
|relief=Italy_relief_location_map.jpg
|#default=Italy_location_map.svg
}}
|iwidth=1034
|iheight=1299
|name=Italie
|zone=pays
|geo=-108
|top=47.4
|bottom=35.3
|left=6.2
|right=19
|projection=Projection équirectangulaire
}}<noinclude>
{{Documentation paramétrage de carte}}
<!--...-->
</noinclude>
{{#switch:{{{1}}}
|name=Italy
| top    = 47.4
| bottom = 35.3
| left   = 6.2
| right  = 19.0
| image  = Italy location map.svg
}}<noinclude>
{{Location map/Info|Italy}}
<!--...-->
</noinclude>

The comparison between (fr) {{Géolocalisation/Italie}} and (en) {{Location map Italy}} shows that there are very similar. In particular, the only significative difference between non-optimized french version and english version is always[4] (fr) "{{Géolocalisation/Projection équirectangulaire|{{{1}}}|{{{2}}}|{{{3}}}" / (en) "{{#switch:{{{1}}}".

Futhermore, french version has additional datas :

zone
is used for a better automatized categorisation (see Catégorie:Modèle de paramétrage de carte).
geo
is used to create a useful link.
Code Result
{{Lien World Gazetteer|Cities of Italiy
|geo={{Géolocalisation/Italie|geo}}
}}
name
is not a stupid subpagename but...
Code Result
[[{{Géolocalisation/Géorgie|name}}]] vs
[[{{Géolocalisation/Géorgie (États-Unis)|name}}]]
Géorgie vs

Géorgie

image
has alternative images when they exist. It is useful, for {{Infobox Montagne}} enjoys relief and it allows this ...
Code Result
<div class="img_toggle">
<div class="geobox" style="text-align: center">{{Carte/Italie
|type=relief
|légende=relief map of italy}}</div>
<div class="geobox">{{Carte/Italie
|type=administrative
|légende=Administrative map of italy}}</div>
</div>
projection
is used for ... well, just an information  .
code
is a function of {{Géolocalisation/Projection équirectangulaire}}. With it, optimization is a piece of cake because ...
Code Result
  {{Géolocalisation/Projection équirectangulaire
|code|...|...
|top=47.4
|bottom=35.3
|left=6.2
|right=19
|image=Italy_location_map.svg
|iwidth=1034
|iheight=1299
|name=Italie
|zone=pays
|geo=-108
}}
 <!--

VERSION OPTIMISÉE:

-->{{#switch:{{{1}}}
|y={{#expr: ({{{2}}}-(47.4))*-8.2644628099174}} 
|x={{#expr: ({{{3}}}-(6.2))*7.8125}}
|image=Italy_location_map.svg
|iwidth=1034
|iheight=1299
|name=Italie
|zone=pays
|genre=
|top=47.4
|bottom=35.3
|left=6.2
|right=19
|projection=Projection équirectangulaire
}}

From image to its parametrization modifier

The question is: What information the cartographer must provide (in the documentation of the image on Commons) to facilitate the creation of the its map parameterization template ?

Equirectangular Projection
We need latitudes and longitudes on the edges of the map (left, right, top, bottom).
General Case
Informations to provide are what mathematical projection is used and its parameters. These informations are most often provided correctly in the images created recently. But this is not enough ! It does not provide scale[5] / the extent of the drawing area (the scope ?). Additional parameters depend on which projection is used ; but generally, (left, right, top, bottom) (latitudes and longitudes on the center[6] of the edges of the map) are valuable informations to provide[7].
Unfortunatly, these extra parameters are often missing. Therefore, Template's creator has to proceed by trial and error.
Finally, we have to mention the alternative maps which share the same projection.

An example of a fully documented map : Commons:File:Europe laea location map.svg

fr versus de modifier

(fr) {{G}} versus (de) {{Positionskarte}}.

Location map templates with equirectangular projection modifier

Location map templates with equirectangular projection specify the parameters directly.

{{Géolocalisation/Italie}} versus {{Positionskarte Italien}}
Code before optimization (fr) Code after optimization (fr) Code (de)
{{Géolocalisation/Projection équirectangulaire
|{{{1}}}|{{{2}}}|{{{3}}}
|top=47.4
|bottom=35.3
|left=6.2
|right=19
|image={{#switch: {{{2|}}}
|relief=Italy_relief_location_map.jpg
|#default=Italy_location_map.svg
}}
|iwidth=1034
|iheight=1299
|name=Italie
|zone=pays
|geo=-108
}}<noinclude>
{{Documentation paramétrage de carte}}
<!--...-->
</noinclude>
{{#switch:{{{1}}}
|y={{#expr: ({{{2}}}-(47.4))*-8.2644628099174}}
|x={{#expr: ({{{3}}}-(6.2))*7.8125}}
|image={{#switch: {{{2|}}}
|relief=Italy_relief_location_map.jpg
|#default=Italy_location_map.svg
}}
|iwidth=1034
|iheight=1299
|name=Italie
|zone=pays
|geo=-108
|top=47.4
|bottom=35.3
|left=6.2
|right=19
|projection=Projection équirectangulaire
}}<noinclude>
{{Documentation paramétrage de carte}}
<!--...-->
</noinclude>
{{#switch:{{{1}}}
| name   = Italien
| top    = 47.4
| bottom = 35.3
| left   = 6.2
| right  = 19.0
|image={{#switch: {{{2|}}}
|relief=Italy relief location map.jpg
|#default=Italy location map.svg
}}<noinclude>
{{Positionskarte/Info}}
<!--...-->
</noinclude>
  • The parameters left, top, right, bottom and image are equal to the french version.
  • Multiple image types are supported.
  • There are no parameters iwdth, iheight, zone or geo.

Map parameterization templates modifier

Other projections are suported through map parameterization templates like in (fr).

{{Géolocalisation/Québec (conique)}} versus {{Positionskarte Kanada Québec (Kegelprojektion)}}
Code before optimization (fr) Code after optimization (fr) Code (de)
{{Géolocalisation/Projection conique avec DL
|{{{1}}}|{{{2}}}|{{{3}}}
|image=Canada_Quebec_relief_location_map-conic_proj.jpg
|iwidth=1184
|iheight=1318
|latitude=53.975
|longitude=-68.425
|x0=592
|y0=-2230
|s=0.8127604
|t=1.3701197
|name=Québec
|zone=province canadienne
|geo=-847
}}
{{#switch:{{{1}}}
|y={{#expr: -169.19575113809 + 
     ( 1  - ({{{2}}}- 53.975) *
      (0.023913099911515 + 2.4281155961195E-6 * ({{{2}}}- 53.975) * ({{{2}}}- 53.975) )
     ) *
     (
       219.19575113809 - 0.022053724358958* ({{{3}}}- -68.425) * ({{{3}}}- -68.425)
          
     )
   }}
|x={{#expr: 50 + 
     ( 1  - ({{{2}}}- 53.975) *
      (0.023913099911515 + 2.4281155961195E-6 * ({{{2}}}- 53.975) * ({{{2}}}- 53.975) )
     ) *
     ({{{3}}}- -68.425) *
     (
       3.4612721058717 - 0.00011608184393774 * ({{{3}}}- -68.425) * ({{{3}}}- -68.425) 
     )
   }}
|image={{#switch: {{{2|}}}
|relief=Canada_Quebec_relief_location_map-conic_proj.jpg
|#default=Canada_Quebec_location_map-conic_proj.svg
}}
|iwidth=1184
|iheight=1318
|name=Québec
|zone=province canadienne
|geo=-847
|latitude=53.975
|longitude=-68.425
|left=-81
|right=-56
|top=65
|bottom=44.4
|x0=592
|y0=-2230
|s=0.8127604
|t=1.3701197
|projection=Projection conique avec DL
}}
{{Positionskarte/Längentreue Kegelprojektion A
|{{{1}}}|{{{2}}}|{{{3}}}
|latitude=53.975
|longitude=-68.425
|aspectRatio=1184/1318
|px0=592/1184*100
|py0=-2230/1318*100
|s=0.8127604
|t=1.3701197
|image={{#switch: {{{2|}}}
|relief=Canada_Quebec_relief_location_map-conic_proj.jpg
|#default=Canada_Quebec_location_map-conic_proj.svg
}}
|name=Québec
}}<noinclude>
{{Positionskarte/Info}}
<!--...-->
</noinclude>
  • There is no optimization
  • All parameters are relative. Absolute parameters like iwidth, iheight, x0, y0 are replaced by percentage parameters like aspectRatio, px0, py0

The set of available map parameterization templates is different:

Projection Map parameterization template in (fr) Map parameterization template in (de)
Projection cylindrique équidistante {{Géolocalisation/Projection équirectangulaire}} {{Positionskarte/Plattkarte}}
Projection azimutale équivalente de Lambert {{Géolocalisation/Projection azimutale équivalente de Lambert}} {{Positionskarte/Flächentreue Azimutalprojektion}}
Projection de Postel {{Positionskarte/Mittabstandstreue Azimutalprojektion in Pollage}}
? {{Géolocalisation/Projection conique équidistante}} {{Positionskarte/Längentreue Kegelprojektion}}
{{Géolocalisation/Projection conique linéaire}} {{Positionskarte/Lineare Kegelprojektion}}
? {{Géolocalisation/Projection conique avec DL}} {{Positionskarte/Längentreue Kegelprojektion A}}
{{Géolocalisation/Projection polyconique}}
{{Géolocalisation/Projection conique modifiée}}
{{Géolocalisation/Projection arquée}}
{{Géolocalisation/Projection linéaire}}
{{Géolocalisation/Projection perspective}}
Projection sinusoïdale {{Géolocalisation/Projection sinusoïdale}}
Projection de Winkel-Tripel {{Positionskarte/Winkel-Tripel-Projektion}}
Cropped map {{Géolocalisation/Projection découpée}}
Map inset {{Positionskarte/Einklinker}}

There are several legacy projection templates that have been created before map parameterization templates became available. They use formulas for x and y calculation like the Russian example below.

fr versus ru modifier

{{Géolocalisation/Russie}} versus {{ПозКарта Россия}}
Code after optimization (fr) Code (ru)
{{#switch:{{{1}}}
|y={{#expr: 2.3132084200786* 
           ( -8.332095476409 + (95.522095476409-({{{2}}}))*
              cos(0.014102095408045*({{{3}}}+
                  {{#ifexpr: {{{3}}}<0|260|-100}}) ) 
           ) }}
|x={{#expr: (50 + 
             1.2476831190433*(95.522095476409-({{{2}}}))* 
              sin(0.014102095408045*({{{3}}}+
                  {{#ifexpr: {{{3}}}<0|260|-100}}) ) 
            ) }}
|image={{#switch: {{{2|}}}
|relief=Russia edcp relief location map.jpg
|#default=Russia_edcp_location map.svg
}}
|iwidth=1181
|iheight=637
|name=Russie
|zone=pays
|genre=fs
|geo=-183
|left=16
|right=180
|top=87.19
|bottom=43.96
|longitude=100
|latitude1=59
|latitude2=49
|latitudeG=95.522095476409
|n=0.80799054917181
|dx=1
|projection=Projection conique équidistante
}}
{{#switch:{{{1}}}
|name = Россия
|type = custom
|image = {{#switch:{{{2|}}}
 |physical = Russia edcp relief location map.jpg
 |#default = Russia edcp location map.svg
}}
}}

Russian version looks empty. Of course, russian contains less datas ; but no projections appears. In fact, we find these projections in 2 sub-templates : {{ПозКарта Россия/x}} and {{ПозКарта Россия/y}} (a good idea)

Comparisons between formula in {{Géolocalisation/Russie}} and {{ПозКарта Россия/x}}
Formula in {{Géolocalisation/Russie}} (fr) Code (ru)
x=(50 +
    1.2476831190433*(95.522095476409-({{{2}}}))* 
    sin(0.014102095408045*({{{3}}}+
        {{#ifexpr: {{{3}}}<0|260|-100}}) ) 
  )
50.0 + 
71.51617284504452 * ((1.6671750744677123-({{{2}}}*pi / 180)) * 
sin(0.807990549171814 * ({{{1}}} + 
    ({{{1}}}<0)*360 - 100) * pi / 180))

Formulae are equivalent, but parameters differs : (latitude, longitude) is ({{{2}}}, {{{3}}}) on french system, ({{{2}}}, {{{1}}}) on russian one. Therefore, {{Géolocalisation/Russie|x|latitude|longitude}} corresponds to {{ПозКарта Россия/x|longitude|latitude}}

Appendix modifier

The panel of points modifier

Notes modifier

  1. but no interwiki links, for I can't find similar pages on other WP  STyx
  2. Of course, some templates (infoboxes or map templates) are all in one.
  3. since version 2
  4. if the two versions share the same image of course.
  5. exceptionally, horizontal scale and vertical scale are required.
  6. (top, bottom) are latitudes of the edges of the map on the central meridian. Specifically, This meridian is a vertical straight line with the given longitude "longitude". If this meridian isn't at (/on?) the middle of the map, one must also provide its position on the image (using the parameter "x0").
  7. In particular, the "generic map parameterization template" (/"map parameterization meta-template"?) {{Géolocalisation/Projection conique équidistante}} estimates the scale from (top,bottom). It also estimates (from (top-bottom) and ratio iheight/iwidth) the width of the area shown on the map. This estimate will be wrong if the map has undergone a deformation. When it happens, one use dx parameter to fix.