Key:ref:ine - OpenStreetMap Wiki
Key:ref:ine
From OpenStreetMap Wiki
Jump to navigation
Jump to search
Help
Key:ref:ine
In other languages
Afrikaans
asturianu
azərbaycanca
Bahasa Indonesia
Bahasa Melayu
bosanski
brezhoneg
català
čeština
Crnogorski
dansk
eesti
Esperanto
euskara
Frysk
Gàidhlig
galego
hrvatski
Ido
interlingua
íslenska
italiano
Kreyòl ayisyen
kréyòl gwadloupéyen
kurdî
latviešu
Lëtzebuergesch
lietuvių
magyar
Nederlands
norsk
norsk nynorsk
occitan
polski
português
română
sardu
shqip
slovenčina
slovenščina
srpski (latinica)
suomi
svenska
Tagalog
Tiếng Việt
Türkçe
Zazaki
Ελληνικά
беларуская
български
македонски
монгол
русский
српски / srpski
українська
հայերեն
עברית
العربية
سرائیکی
فارسی
پنجابی
پښتو
नेपाली
मराठी
हिन्दी
বাংলা
ਪੰਜਾਬੀ
தமிழ்
മലയാളം
සිංහල
ไทย
မြန်မာဘာသာ
한국어
ქართული
ⵜⴰⵎⴰⵣⵉⵖⵜ
中文(简体)
中文(繁體)
粵語
Other languages...
ref:ine
Description
Identifier for population units by the National Statistical Offices, both Spain and Portugal
Group:
references
Used on these
elements
Useful combination
name
=*
place
=*
population
=*
population:date
=*
wikidata
=*
wikipedia
=*
See also
INEGI:MUNID
=*
Status:
de facto
ref:ine
More details at tag
info
Tools for this tag
taginfo
AD
AT
BE
BR
BY
CH
CN
CZ
DE
DK
FI
FR
GB
GR
HU
IE (N+S)
IN
IR
IT
LI
LU
JP
KP
KR
NL
NO
PL
PT
RU
ES
AR
MX
CO
BO
CL
EC
PY
PE
UY
VE
TW
UA
US
VN
overpass-turbo
QLever
Postpass via overpass-turbo
OSM Tag History
It is a subkey of
ref
=*
and its values are numbers used as identifiers for population units, both by the
Instituto Nacional de Estadística (Spain)
P772
and the
Instituto Nacional de Estatística (Portugal)
P6324
, even though their composition differs.
Contents
Spain
1.1
Interactive map
1.2
Validation queries
1.2.1
Nodes
1.2.2
Relations
Portugal
Spain
Subdivision
Digits
Reference formula
Notes
Province
PP
--
There is no
ref:ine
=*
for provinces
admin_level
Municipality
MMM
ine:municipio
=*
(PP + MMM) + "000000"
Only for
relations
boundary
administrative
and
admin_level
Collective entity
CC
ine:municipio
=*
(PP + MMM) + CC + "0000"
Only for
relations
boundary
administrative
and
admin_level
Singular entity
SS
ine:municipio
=*
(PP + MMM) + CC + SS + "00"
If the entity is a node,
do not
use this code, the nucleus code is preferable
Nucleus/scattering
NN
ine:municipio
=*
(PP + MMM) + CC + SS + NN
Only for
nodes
: in nucleus elements NN can be 01, 02, 03, 04, etc... and in scattered elements NN is equal to 99
Interactive map
You may check the
current status of the missing and leftover references
through the following visualization:
Validation queries
Nodes
The spanish localities (i.e.
place
=*
ref:ine
=*
code lies in the value of
ine:municipio
=*
plus 6 digits, therefore we can check it out using maths.
The next overpass query checks if the nodes contain the proper value, that is
ine:municipio * 1e6 < ref:ine < ine:municipio * 1e6 + 1e6
. If the following query
returns nothing
, it means everything is OK.
Note
: The next query takes several minutes to run.
try it yourself in overpass-turbo
out
xml
][
timeout
900
];
area
"ISO3166-1"
"ES"
->
searchArea
relation
"admin_level"
"8"
][
"ine:municipio"
][
"boundary"
"administrative"
](
area
searchArea
);
map_to_area
foreach
->
mun
// como no existe un operador de substring, convertimos ambas etiquetas a números
// (debido a un error de parseo de variables que empiezan en cero, se añade y luego se resta, un número superior a los códigos)
// como el ref:ine tiene 6 cifras añadidas a su ine:municipio, multiplicamos por 1 millón
// de tal modo que los ref:ine deberá pertenecer al rango:
// ine:municipio * 1e6 < ref:ine < ine:municipio * 1e6 + 1e6
//
// ejemplo:
// ine:municipio=47140
// ref:ine=47140000100
//
// 47140 * 1e6 < 47140000100 < 47140 * 1e6 + 1e6
node
area
mun
)[
"ref:ine"
](
if
number
1e12
"ref:ine"
])
1e12
((
number
1e12
mun
"ine:municipio"
]))
1e12
1e6
));
node
area
mun
)[
"ref:ine"
](
if
number
1e12
"ref:ine"
])
1e12
((
number
1e12
mun
"ine:municipio"
]))
1e12
1e6
1e6
));
);
out
);
Likewise, we can further refine the entities validation, instead of consulting by
municipality
we do so by a lower unit, such as, the
civil parishes
for Galicia and Asturias, or the
deputations/districts
for Region of Murcia. A reference will be correct whenever:
ref:ine parish < ref:ine locality < ref:ine parish + 1e4
. If the following query
returns nothing
, it means everything is OK.
Note
: This query will make sense whenever the municipalities contain
boundary
administrative
and
admin_level
relations.
try it yourself in overpass-turbo
out
xml
][
timeout
900
];
area
"ISO3166-2"
"ES-GA"
->
searchArea
relation
"admin_level"
"9"
][
"boundary"
"administrative"
](
area
searchArea
);
map_to_area
foreach
->
mun
node
area
mun
)[
"ref:ine"
](
if
number
1e12
"ref:ine"
])
1e12
number
1e12
mun
"ref:ine"
]))
1e12
));
node
area
mun
)[
"ref:ine"
](
if
number
1e12
"ref:ine"
])
1e12
number
1e12
mun
"ref:ine"
]))
1e12
1e4
));
);
out
);
Relations
The spanish municipalities (i.e.
admin_level
ref:ine
=*
code lies in the value of
ine:municipio
=*
plus 6 zeros, therefore we can check it out using maths.
The next overpass query checks if the relations contain the proper value, that is
ine:municipio * 1e6 = ref:ine
. If the following query
returns nothing
, it means everything is OK.
try it yourself in overpass-turbo
out
xml
][
timeout
900
];
area
"ISO3166-1"
"ES"
->
searchArea
relation
"admin_level"
"8"
][
"ine:municipio"
][
"boundary"
"administrative"
](
area
searchArea
->
all
relation
all
"ref:ine"
->
ok
// relaciones cuyo código ref:ine difiere del ine:municipio
// (debido a un error de parseo de variables que empiezan en cero, se añade y luego se resta, un número superior a los códigos)
//
// ejemplo:
// ine:municipio=47140
// ref:ine=47140000000
//
// 47140 * 1e6 = 47140000000
relation
ok
if
((
number
1e12
set
"ine:municipio"
]))
1e12
1e6
!=
number
1e12
set
"ref:ine"
]))
1e12
))
->
wrong
// relaciones sin código ref:ine
(.
all
ok
;)
->
missing
(.
missing
;.
wrong
;);
out
geom
Portugal
(To be done once the portuguese wiki is made)
Retrieved from "
Categories
Key descriptions for group "references"
Key descriptions
Key descriptions with status "de facto"
References
Hidden categories:
Pages unavailable in German
Pages unavailable in French
Pages unavailable in Italian
Pages unavailable in Dutch
Pages unavailable in Russian
Pages unavailable in Japanese
Pages loading description from data item
Not copied status
Not copied onNode
Not copied onWay
Not copied onArea
Not copied onRelation
Item with no description in language CS
Item with no description in language DE
Item with no description in language JA
Item with no description in language RU
Item with no description in language FR
Item with no description in language PT
Item with no description in language IT
Item with no description in language UK
Item with no description in language PL
Item with no description in language FI
Item with no description in language NL
Item with no description in language HU
Item with no description in language ZH-HANS
Item with no description in language ZH-HANT
Navigation menu