Fi:Karttakohteet

From OpenStreetMap Wiki
(Redirected from Fi:Elements)
Jump to navigation Jump to search

OpenStreetMapin kartat koostuvat kokonaisuudessaan muutamasta yksinkertaisesta perusosasta eli elementistä. Ne ovat

  • piste (määrittää pisteen kartalla),
  • viiva (määrittää viivamaiset kohteet kuten tiet ja alueet), ja
  • relaatio (määrittää muiden elementtien väliset suhteet).

Kaikilla elementeillä voi olla määreitä eli tägejä, joilla määritetään mitä kyseinen elementti esittää.


Piste node

Pääartikkeli: Node

Piste määrittelee yhden maantieteellisen sijainnin, johon tarvitaan leveys- ja pituusasteet. Lisäksi pisteelle voi määrittää myös korkeuden key:ele-tagilla tai sille voidaan määrittää layer=* (taso) tai level=* (korkeus). Pisteiden ominaisuuksia voidaan antaa myös viivoilla oleville pisteille.

Kaupunki, kylä tai kaupunginosa voidaan määrittää pisteellä käyttämällä tageja place=* ja name=*. Pisteellä ei välttämättä kuitenkaan ole yhtään tagia esimerkiksi jos sitä käytetään viivan pisteenä. Joskus viivalla olevalle pisteelle voi olla tarpeellista antaa tageja (kuten power=tower kuvaamaan voimalinjan pylvästä tai building=entrance näyttämään rakennuksen sisäänpääsyn sijainnin.

A node can be included as member of relation and may have an associated Role.

Viiva way closed way area

Pääartikkeli: Way

Toinen pääelementti on viiva, joka muodostuu 2-2000 pisteen välille. Viivat voivat olla avoimia kuvioita (vektorit) tai suljettuja monikulmioita (alueet).

A way can be included as member of relation and may have an associated Role. Ways of more that 2000 nodes will need to be split into two or more shorter ways. Where ways meet, for example at a road junction, they should share a node. Ways may be 'open' (where they do not share a first and last node) or 'closed' where they do. In some cases a closed way will be interpreted as a 'closed polyline' and in other instances as an Area and in some cases as both a closed polyline and an area. It is necessary to interpret the tags to review the tags associated with the way and in some cases the tags associated with any relations associated with the way.

Avoin viiva way

Avoin viiva (katso myös Polyline) on 2-2000 pisteen muodostama viiva, jolla on aloitus- ja päätepiste. Suurin osa teistä, joista ja rautateistä on avoimia viivoja.

Suljettu viiva closed way

Suljetun viivan aloitus- ja päätepiste on sama. Esimerkiksi liikenneympyrä (highway=tertiary + junction=roundabout) on suljettu viiva.

Alue area

Pääartikkeli: Area

Alue (myös kuvio) on suljettu, viivojen rajaama alue. Closed ways with some tags such as landuse=* are assumed to be areas, others, such as highway=footway are assumed to be closed Polylines unless they also have a area=yes tag.

Areas can also be described using the Multipolygon relation.

Relation relation

Pääartikkeli: Relation

A Relation consists of an ordered list of nodes, ways and sometimes also other relations as member of the new relation. The relation can have tags and each element can also optionally also have a defined role within the relation. A single element may appear multiple times in a relation and a relation can be included as member of another relation.

Tag tag

Pääartikkeli: Tag

A Tag should perhaps not be regarded as an "Element" in it's own right, but rather it is a small unit of data attached to one of the above elements. A tag consists of two free format textual fields, a 'key' and a 'value', each of which are Unicode strings of up to 255 characters. There are however many conventions on how individual features are best described. By way of example, a residential road is defined using a key of 'highway' and a value of 'residential' to form the tag highway=residential. Keys may in addition use a namespace to further refine their purpose, so that maxspeed:winter=* indicates that there is a separate speed limit during the winter.

Common attributes

Nodes, Ways and Relations have the following attributes in common i.e. we store these fields for every element.

name value description
user string The display name of the user who last modified the object. A user can change their display name
uid integer The numeric user id. of the user who last modified the object. The user id. number will remain constant.
timestamp W3C Date and Time Formats time of the last modification
visible "true"
"false"
whether the object is deleted or not in the database, if visible="false" then the object should only be returned by history calls.
version integer The edit version of the object. Newly created objects start at version 1 and the value is incremented by the server when a client uploads a new version of the object. The server will reject a new version of an object if the version sent by the client does not match the current version of the object in the database.
changeset integer The changeset in which the object was created or updated.

Of course in addition we store the tags, and also a full editing history of every element.