Jump to content

User:Teslaton/Tools/GeoLocator

From Wikipedia, the free encyclopedia
GeoLocator
Type of site
Geotagging tool
Available inEnglish (+ Polish), Slovak
OwnerTeslaton
Created byTeslaton
URLtools.freeside.sk/geolocator/geolocator.html
CommercialNo
RegistrationNo
Launched2008-10-30
Current statusOnline

GeoLocator is a simple tool (DHTML web application), designed to streamline the process of geotagging, especially for Wikipedians. Latest release is 0.35 (2015-04-11), see changelog.

Tool serves as interactive coordinate editor and metadata markup generator, allowing:


Features

[edit]
  • integrated Google Maps control for interactive location and heading selection
  • metadata roundtrip support – pasting of existing geotag, updating it's location and/or parameters and encoding a new one
  • auto elevation/region/address from coords via async. requests to reverse geocoding services
  • flexible coordinate parser (it tries hard to parse almost any text/markup, containing coordinates)
  • editable coordinate parameters (type, scale, region, heading)
  • metadata markup generator with many predefined and one custom template
  • configurable number precisions (decimal degrees and arc seconds)
  • configurable heading angle division (compass rose points): 8, 16, 32 (abbreviations) or 360 (numeric)
  • URL integration

Typical usage scenarios

[edit]

Authoring a brand new template/geotag

[edit]
  1. start from scratch or enter some initial location into query box (in almost any meaningful format).
  2. find your location on embedded map (move/zoom/search it as needed)
  3. place location marker on most exact location ([Ctrl+click]/[Alt+click] over your location, or by dragging a marker), typically using most detailed map zoom available
  4. eventually choose appropriate additional coordinate parameters (type, dim, scale, region)
  5. eventually define a viewing diameter around marker location ([Ctrl+Shift+click])
  6. eventually define a heading (camera view direction) from selected location ([Shift+mouse move]/[Shift+click])
  7. click on resulting geotag markup in most suitable format to copy it to clipboard

Updating or improving an existing coordinates/template/geotag

[edit]
  1. paste existing coordinates or even whole existing geotag into query box and click Apply. Location is shown on a map.
  2. update location marker to more exact location (by dragging it or by [Ctrl+click]/[Alt+click] over new location)
  3. eventually define a viewing diameter around marker location ([Ctrl+Shift+click])
  4. eventually define a heading (camera view direction) from that location ([Shift+mouse move]/[Shift+click])
  5. eventually update some of coordinate parameters (type, scale, region)
  6. click on resulting geotag markup in most suitable format to copy it to clipboard

Coordinate format conversion or normalization

[edit]
  1. type or paste existing coordinates in some format (D, DM, DMS, template markup or map URL) and click Apply
  2. copy parsed coordinates, template markup or map URL (in most suitable output format) via clipboard

Practical hints

[edit]

Viewing diameter

[edit]

Viewing diameter, when specified, is used by GeoHack to calculate appropriate map scale – most detailed zoom level, so that whole area inside diameter is visible. Don't be overly precise, when specifying diameter, 2 significant digits are enough (e.g.: dim:1300 instead of dim:1279).

Use of viewing diameter is preferred over explicit setting of scale.

Heading

[edit]

Only use heading (camera view direction) parameter for media (photo) geotagging. It's not intended for wikipedia article related geotags. GeoLocator does not export heading parameter for article templates even if you define one.

Precision

[edit]

Don't be overly precise. Generally, the larger the object being mapped, the less precise the coordinates should be. A general rule is to give precisions approximately one tenth the size of the object, unless there is a clear reason for additional precision. Overly precise coordinates can be misleading by implying that the geographic area is smaller than it truly is.

Approximate length equivalents of different longitude steps at selected latitudes:

Latitude Town 1′ 1″ 0.1″ 0.01″ 0.1° 0.01° 0.001° 0.0001° 0.00001° 0.000001°
60° Saint Petersburg 56 km 0.9 km 15 m 1.5 m 15 cm 5.6 km 560 m 56 m 5.6 m 56 cm 5.6 cm
45° Bordeaux 79 km 1.3 km 22 m 2.2 m 22 cm 7.9 km 790 m 79 m 7.9 m 79 cm 7.9 cm
30° New Orleans 96 km 1.6 km 27 m 2.7 m 27 cm 9.6 km 960 m 96 m 9.6 m 96 cm 9.6 cm

(equator)
Quito 111 km 1.9 km 31 m 3.1 m 31 cm 11.1 km 1110 m 111 m 11.1 m 111 cm 11.1 cm

Syntax

[edit]

Supported coordinate formats

[edit]

Query parser makes use of precisely tuned set of regular expression rules and "focuses" on meaningful digit groups only. It therefore accepts wide range of inputs with almost any mixture of separators, whitespace characters or other "garbage", present in query string. This is convenient when using coordinates already present in some format.

Basic coordinate format types:

  • [-] DD[.DDD] [N|S], [-] DDD[.DDD] [E|W]
  • [-] DD MM[.MMM] [N|S], DDD MM[.MMM] [E|W]
  • [-] DD MM SS[.SSS] [N|S], DDD MM SS[.SSS] [E|W]
  • pasted template markup
  • pasted GeoHack URL
  • pasted map URL

See also query parser online unit tests (just positive cases yet) I use during messing up with it to assure that some case didn't break-up, while adding/altering the other.

Template variables

[edit]

GeoLocator uses the same template syntax and variables as GeoTemplate does, adding few more:

  • list of all coordinate parameters in GeoHack format, serialized into single string:
    • {ghparams}, e.g. "type:landmark_scale:1000_region:DE-NI_heading:NEbN"
    • {ghparamsp} – the same, prefixed by pipe when non-empty, e.g. "|type:landmark_scale:1000_region:DE-NI_heading:NEbN"
    • {ghparamsu} – the same, prefixed by underscore when non-empty, e.g. "_type:landmark_scale:1000_region:DE-NI_heading:NEbN"
    • {ghparamsnh}, {ghparamsnhp}, {ghparamsnhu} – the same, but with heading parameter excluded (which should be used in camera location geotags only)
  • {% expression %} – generic javascript expression template macro. Expression is evaluated in context with coord data, bound as local variables,
    e.g.: {% (lonEW == 'E' ? 'v.d.' : 'z.d.') %}"v.d."
  • digit width specification, e.g. {lonsecdec:2}"08"

URL parameters

[edit]
parameter description default value
q, params query string – coordinates, map URL or template markup
ll map center, independent of marker position ([-]DD.DDD,[-]DDD.DDD) marker position
spn map span ([-]DD.DDD,[-]DDD.DDD) adaptive
t map type ('m': Map, 'k': Satellite, 'h': Hybrid, 'p': Physical/terrain, 'osm': OpenStreetMap) 'h'
ct custom geotag template {latdegabs}°{latminint:2}′{latsecdec:2}″ {latNS},
{londegabs}°{lonminint:2}′{lonsecdec:2}″ {lonEW}
dp degrees precision – number of decimal places 6
sp arc seconds precision – number of decimal places 2
mp diameter precision – number of significant digits 2
hp heading points – number of compass rose points to use: 4 (N, E, S, W), 8 (N, NE, E, ...), 16 (N, NNE, NE, ...) 32 (N, NbE, NNE, ...) or 360 (decimal angle) 16
rm region mode – region parameter fill-in mode ('auto', 'custom', '') 'auto'
pr precision rects – visualization of coord precision (flags: 'd', 'm', 's', 'g') ''

Notices:

  • Don't forget to URL encode all parameters properly, when passing them via URL

Examples:

Design goals

[edit]

Technology

[edit]

Known issues

[edit]
  1. [Opera/Linux]: Neither [Ctrl+click], nor [Alt+click] does work ([Ctrl+click] is intercepted by Opera, [Alt+click] by window manager)
    • workaround: use [X+click] instead (hold down [X] character key as a modifier while clicking)
  2. [Opera/*]: Heading: when moving mouse while already holding down [Shift], [Shift+click] does not work
    • workaround: first, move cursor where desired, then press [Shift+click]
  3. Display lag or slow response when visualy setting heading/diameter
    • workaround: use browser with fast JS engine (e.g. recent versions of Firefox, Chrome)
    • workaround: dont't move mouse while already holding [Shift]/[Ctrl+Shift]. Instead: first, move cursor where desired, then press [Shift+click]/[Ctrl+Shift+click].

ChangeLog

[edit]
2015-04-11  0.35
  - feature: fulltext search is back again, via Google Places API

  - minor: location preview services fixes

2013-01-29  0.31
  - feature: fluid layout to maximize map area on higher resolution screens
    - should work seamlessly on modern browsers, web search ,Google.com
  - feature: precision visualization (1°, 1', 1/0.1/0.01", 0.0001/0.00001/0.000001°)

  - minor: quick clear icons ("[x]" beside template params)
  - minor: show helper
  - minor:+Google + Bing, Flickr, Geocaching (location preview services)
  - minor: + GPX waypoint (export format)
  - minor: "type:" param excluded from {{Location/Location dec}} markup (type:camera assumed)
    - ghparamsnt, ghparamsntp, ghparamsntu macros introduced

2012-03-11  0.30
  - minor: clickable custom template
  - minor: fixes

2011-04-16  0.29
  - minor: new standard templates:
    - {{Object location}}, {{Object location dec}} for Commons
  - minor: partial Polish localization (presets, links, templates only)
  - minor: stable.toolserver.org/geohack -> toolserver.org/~geohack
  - minor: auto-show custom template when ct param set

2010-03-31  0.28
  - feature: viewing diameter ("dim:D") in/edit/out support
    - interactive ([Ctrl+Shift+click]) or manual numeric definition
    - configurable precision (number of significant digits), default: 2
    - when dim:D is present in input geotag/url:
      - initial map scale is calculated according to diameter (scale = 10 * dim)
      - diameter circle is drawn around marker
  - feature: OpenStreetMap as layer via OSM Mapnik tile server

  - minor: new standard templates:
    - {{Geobox}} compatible coords snippet
  - minor: german {{Coordinate}} template: output of filled-in params only (type, dim, region)
  - minor: layout fixes
  - minor: favicon
  - minir: [X+click] alternative to [Ctrl+click]/[Alt+click] for Opera/Linux

2010-03-20  0.27
  - feature: elevation under marker via async. reverse geocoding
    - currently single fixed service/model only:
      Aster Global Digital Elevation Model (samples ~ 30x30 m between 83°N..65°S) via geonames.org
    - @todo: selection from multiple models/services
      (would require UI changes, settings persistence, too much work for too small benefit for now)

  - minor: new map links:
    - Google Maps: Wikipedia articles, Panoramio photos, Wikimedia Commons photos
    - OpenStreetMap
    - GeoHack globe:export
  - minor: new template params:
    - {elevation}, {elevationint}, {osmzoom}
  - minor: new standard templates:
    - {{Coordinate}} for german wiki ("More wikipedia templates" section)

2008-11-06  0.26
  - feature: standard map view presets above map

  - i18n: Slovak localization (S-JTSK coord in/out support; sk templates, map links, presets)
  - minor: support for generic javascript "eval" template macro. Code is evaluated in context with
    coord data, bound as local variables. E.g.: {% (lonEW == 'E' ? 'v.d.' : 'z.d.') %} -> 'v.d.'
  - minor: support for template variable digit width specification,
    e.g. {lonsecdec} -> '8'; {lonsecdec:2} -> '08'
  - minor: pan control middle button ("Return to the last result") always focuses map on marker
  - minor: permalink includes map span/center/type. Can be used to save/restore full state.

2008-11-01  0.25
  - feature: auto region/address from coord via GoogleMaps reverse geocoding service
  - feature: coord markup as hyperlink with onclick prompt to ease copy-to-clipboard

  - minor: coord parameters also on location display
  - minor: permalink includes state parameters (precisions, custom template)
  - fix: Google Chrome browser: mouse event coordinates fix, code font-size fix

2008-10-26  0.22
  - first public release after few evenings of consolidation and cleanup

2008-02-10  0.11
  - first internal version: simple generic coord parser + fixed markup generator

version archive: · 0.35 (2014-04-11), · 0.34 (2014-10-01), · 0.33 (2014-01-28), · 0.31 (2013-06-01), · 0.30 (2012-03-11), · 0.29 (2011-04-16), · 0.28 (2010-03-31), · 0.27 (2010-03-20), · 0.26 (2008-11-06), · 0.25 (2008-11-01)

Contact

[edit]

Other similar tools

[edit]

See also

[edit]