SIDEBAR
»
S
I
D
E
B
A
R
«
GeoNames.org database id becoming a meteorological location reference
Aug 20th, 2020 by miki

Looking at weather forecasts in my native Denmark I have always noticed a location reference used by DMI, Danmarks Meteorologiske Institut (en:Danish Meteorological Institute). Somehow I managed to not look into the details of that before now.

But this morning while scouting for rain showers and trying out the forecast on the new website of Yr (the long time open data weather service from Norwegian Broadcasting Corporation (NRK) and the Norwegian Meteorological institute (MET)), as kindly suggested by the YR main site which uses the old site by default, I saw the same reference included in the URL.

A closer look at different service’s forecast URLs for my usual whereabouts in Tjæreborg, Denmark, Europe, Earth reveals (se summary below) that they all share this reference and that it stems from the GeoNames.org (wikipedia article) database’s integer reference to the location:

This particular piece of data is described as a field in the “geoname” table of the GeoNames.org main database, and referred to as “geonameid” in the documentation:

geonameid         : integer id of record in geonames database

The contents of the GeoNames.org database is licensed under the Creative Commons Attribution 4.0 International (aka. “CC BY 4.0”, SPDX ID:”CC-BY-4.0″) and available both for your own download and perusal (documentation here) or using web services on geonames.org.

Note, however, that GeoNames.org accumulates a wealth of data sources that according to the OpenStreetMap project might contain copyrighted data. Together with the attribution requirements of its CC BY license this causes OpenStreetMap to not accept data from GeoNames.org into the project’s, ODbL licensed, database.

Fun fact: in Norwegian “yr” actually means drizzle (da:støvregn)
Practical hint: OpenSearch entry for GeoNames.org: http://www.geonames.org/opensearch-description.xml (to add in current browser: go here->find “Plugins”->click “opensearch plugin”)

The Weather Services

2611610 on GeoNames.org

“Get”ting from web service

$ wget -q -O- "https://secure.geonames.org/get?geonameId=2611610&username=demo"
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<geoname>
    <toponymName>Tjæreborg</toponymName>
    <name>Tjæreborg</name>
    <lat>55.46457</lat>
    <lng>8.57968</lng>
    <geonameId>2611610</geonameId>
    <countryCode>DK</countryCode>
    <countryName>Denmark</countryName>
    <fcl>P</fcl>
    <fcode>PPL</fcode>
    <fclName>city, village,...</fclName>
    <fcodeName>populated place</fcodeName>
    <population>2146</population>
    <adminCode1 ISO3166-2="83">21</adminCode1>
    <adminName1>South Denmark</adminName1>
    <asciiName>Tjaereborg</asciiName>
    <alternateNames>Tjaereborg,Tjæreborg</alternateNames>
    <elevation/>
    <srtm3>12</srtm3>
    <astergdem>11</astergdem>
    <continentCode>EU</continentCode>
    <adminCode2>561</adminCode2>
    <adminName2>Esbjerg Kommune</adminName2>
    <alternateName lang="post">6731</alternateName>
    <alternateName lang="unlc">DKTJA</alternateName>
    <alternateName lang="link">https://en.wikipedia.org/wiki/Tj%C3%A6reborg%2C_Denmark</alternateName>
    <alternateName>Tjæreborg</alternateName>
    <timezone dstOffset="2.0" gmtOffset="1.0">Europe/Copenhagen</timezone>
    <bbox>
        <west>8.57175</west>
        <north>55.46907</north>
        <east>8.58762</east>
        <south>55.46008</south>
        <accuracyLevel>0</accuracyLevel>
    </bbox>
</geoname>
$

Extracting from “Gazetteer” exports

$ wget -q https://download.geonames.org/export/dump/DK.zip
$ unzip DK.zip 
Archive:  DK.zip
  inflating: readme.txt              
  inflating: DK.txt                  
$ grep ^2611610 DK.txt
2611610	Tjæreborg	Tjaereborg	Tjaereborg,Tjæreborg	55.46457	8.57968	P	PPL	DK\
		21	561			2146		12	Europe/Copenhagen	2017-10-18
$

 

»  Substance:WordPress   »  Style:Ahren Ahimsa
© 2023 Mikkel Kirkgaard Nielsen, contents CC BY-SA 4.0