Talk:Elements

From OpenStreetMap Wiki
Jump to navigation Jump to search

Confused about what qualifies as an "Element"

I may have missed some but I see the following elements in the data:

   'node', 'way', 'relation', 'tag', 'nd', 'member'

Is there a reason that the Elements documentation does not mention 'nd' or 'member'?

'node', 'way' and 'relation' are owned by root so I could see them being segregated but 'tag' is at the same level as 'nd' and 'member'.

On reviewing the data this becomes obvious but should it not be obvious from the documentation? --Tsingi (talk) 18:55, 4 February 2021 (UTC)

I assume you are looking at OSM XML. The wiki page takes the position of someone editing OSM data via editors. Those users do not see the XML. As the wiki page states at the top, the elements are "node", "way", and "relation". Tags are not elements. The wiki page contains a section on tags to avoid duplicating the "tag" section in each of the elements' sections. This is also very clearly indicated in Template:Elements (very bottom of the page). nd is just a modelling construction to model the fact that a ways contain an ordered list of nodes which in turn contain the geographic positions. The same applies to member and relations. All editors I know abstract this into editing buttons like "add a node to the way", "split way", "reverse direction of way". --Tigerfell This user is member of the wiki team of OSM (Let's talk) 13:27, 7 February 2021 (UTC)

There is a semantic problem here then. Tags are Elements if you are talking about XML, and the map data is XML. Perhaps you should bring back the distinction of Data Primitives (discussed below) because the concept of an Element in XML conflicts harshly with the context you present. A person like me looking at the raw XML data is mislead by this nomenclature. It's just plain wrong. --Tsingi (talk) 16:08, 7 February 2021 (UTC)

Same information as Data Primitives. Merge?

This Elements page has pretty much the same information as Data Primitives. The only slight difference is that Data Primitives talks about the underlying data representation slightly more. e.g. a segment references two node ids. OK that's information which a user (mapper) doesn't need to know, but it doesn't really hurt to know it, and apart from that, there's very little difference between the two pages.

We either should merge these pages ...or we should pick through the 'what links here' lists and carefully choose which of the two pages we should be linking to in each case, and also think about how the naming could be improved. e.g. should 'Data Primitives' be renamed 'Element Data', to give it a clearer relationship with this 'Elements' page?

Personally I'm erring on the side of a merge, but then we still need to chose which page is a better name.

Maybe this is one for the WikiProject Cleanup list -- Harry Wood 12:21, 17 July 2007 (BST)

The content of Data Primitive is more for a developer ("object class"), the content of Elements for a mapper (what is to do). Both pages are not complete regarding the own theme. E.g. in Data Primitive are missing the syntaxes of id/from/to/...; id lower than 0 is possible, but causes by the parser an automatic assignment of id and so on. The informations are more in more time. The informations for a developer (what is an id?) is confusing for a mapper. In this case it seems to be better to separate. --OnTour 22:37, 19 July 2007 (BST)
Yeah I understand the reasons why you might want it to be separate pages, but I'm thinking from a wiki organisational perspective, its easier to have the information in one place (only one page to maintain/link to). It's swings and roundabouts really, but if we are keeping them separate, then maybe 'Data Primitives' should be renamed 'Element Data'. -- Harry Wood 10:57, 20 July 2007 (BST)
I think these pages are a good case for clean up, not sure on a merge or what. I think it might be best to leave each "element" to have it's own short page with description from both points of view. Then used as a template in each separate section of each of these pages. That way, only one section need be updated and both pages maintain their accuracy?
Martin Renvoize 15:56, 7 December 2009 (UTC)
I'd welcome a merge - or a clear separation which term does apply in which contect. What are Elements, compared to Data primitives, what's the difference between keys, features, tags, attributes and properties, ... See e.g. XML_Schema which still names area as one of the base types and does not list relations. --Traut 11:51, 16 January 2008 (UTC)

DONE. Merged by PeterIto 9th Jan 2012. Note discussions have also been merged. This discussion was on Talk:Elements

Merged done 'Elements' -> 'Data Primitive'

This article seems to cover the same topic as Elements. Should we merge them? PeterIto 10:20, 21 December 2011 (UTC)

OK so you've done that, except I would have done it the other way around. I much prefer "Element" to "Data Primitive" . We could have saved a lot of hassle be standardising this terminology years ago. There's a third word used extensively of course: "objects". I think this is quite ambiguous, even more so than "element". I've pushed for calling them "Elements" in beginner documentation such as JOSM/Guide and elsewhere off-wiki when writing about OSM. It's is a much more beginner-friendly term. It doesn't sound too geeky or technical (and lets' face it, the concept of ways & nodes doesn't need to sound geeky. They're simple!) but of the three I think "Data primitives" is the worst. it's also two words, where one would do. -- Harry Wood 22:43, 9 January 2012 (UTC)
Moved back 'Data Primitive' -> 'Elements'
I've moved the merged page back under the Elements name. Main advantage is that all the translations are sorted under the Elements name. (not properly merging the translations meant that I spend some time redundantly translating the data_primitives page again). I'll correct all links. The discussion also moved here. I'm doing this out of the be bold statement on the wiki help pages ;-) --Chaos99 07:59, 15 February 2012 (UTC)
Nice one. As I say above I think 'Elements' is the best word to use (out of several possibilities) and in my opinion it's good that 'Data Primitives' has been merged here. One remaining page naming issue is that it should maybe be 'Element' not 'Elements'
But good point about the page translations. These pages shouldn't really be moved without fixing all sorts of things.
- Harry Wood 11:11, 15 February 2012 (UTC)

Area and Relations

Area on this article is listed as if it was an element (node, way, area). I'd recommend to use the same order as in Data Primitives: node and way, but closed way and area as special types of way.

Done (I changed the Area heading level so that it became a subheading of Way). --Rogerhc 20:06, 14 January 2009 (UTC)

The newer element Relations is not listed yet. --Traut 11:51, 16 January 2008 (UTC)

Relations should be listed as the way to map holes in areas. The current explanation is obsolete. Rhn 20:56, 5 December 2009 (UTC)


Areas

How can you distinguish between an area and a roundabout? -- KristianThy 23:17, 12 December 2006 (UTC)

You flag areas with a suitable key, like landuse:residential, whereas with roundabouts, you label them as highways -- Johndrinkwater 23:16, 13 December 2006 (UTC)
Maybe we should change the "Closed way" section to reflect that? Whether a way is closed does not say at all whether it's an area or not. Take coastlines for example. They're describing an area (it's up to you whether it's the land or the sea), but the coastline ways are not closed -- they'd be too big if they were closed. And AFAIK someone is already working on removing that restriction for other polygon types too. --GabrielEbner 18:03, 24 May 2007 (BST)

Examples of relations in the data?

Can I find examples of relations in use anywhere in XML notation? Thanks. -- Mark 08:07, 8 July 2008 (UTC)

Wish example

Was thinking osm REST file format to render visual data was documented . find only this poor page.You read an xml file retrun by server and have the same raw information  !!! where can i find tutorial not about how parse data ( there is plenty of xml engine ) but all the meaning of attribute and atrribute value and interaction beetween other tag attribute. is there a list of predefine tag value that have been create for rendering but not for basic information ( travel) thank's

Well previous merge was okay (Elements vs Data Primitives) but we have to use term with "data" when we talk about low-level data model

  1. "data model" (node-way-relation-tag)
  2. "data primitives" (node-way-relation-tag)

Reasons behind "data ..." name (and not elements):

  1. OSM is free ... data (Main Page)
  2. we refer to contributing data Contribute map data
  3. we refer to data sources Category:Data sources

...and after that we call low-level quartet (node-way-relation-tag) as "Elements" to increase confusion.


See also SemanticElements - not sure about these. We are using "node", "way", "area", "relation" in Template:Description. Xxzme (talk) 20:23, 6 May 2015 (UTC)

Template:Description/area = special type of Data model/way (closed way with area=yes) OR Data model/relation with Data model/tag (type=multipolygon) Xxzme (talk) 20:31, 6 May 2015 (UTC)

The trouble with that is that "Elements" is an established term. Perhaps a different term would have been better, but that's nothing we can change with a discussion on a wiki page (an agreement on the talk list, on the other hand, would be pretty relevant). Nevertheless, I like that you started a discussion about this. I'm curious what other people think of calling this "Data elements" or something like that. --Tordanik 13:36, 7 May 2015 (UTC)
... and learnosm is not using this confusing "elements" term: [1] [2].
Real answer is there no name to "quartet", we shouldn't use "Elements" and refer to each individual element.
How many tools/sites use this level of abstraction? "Elements" = (node-way-relation-tag)?
We are using different terms in our tag documentation, this is so confusing: (node, way, area, relation). Where is "tag"? We use "feature" instead of "tag" in emplate:Description#Feature_description.
But there meta-features category! Category:Features and this is irrelevant to features(=tags). Xxzme (talk) 13:53, 7 May 2015 (UTC)
There is a name, they are called "Elements". And especially in technical discussions, it's important to have a commonly understood term. The wiki is not just for newbies (in fact I would say that most content is mostly for power users, not newbies at all). So we don't have to dumb everything down. The page is fine as it is and easily understandable for its audience. --Tordanik 13:59, 7 May 2015 (UTC)
We should separate technical content from content for first-time-editors. There Category:Technical - I will never refer to it from beginner guides.
Then we should split readers as Elements (technical in Category:Technical and Elements (Beginners') in Category:Beginners' guide.
Don't harm newbies that we are using "protocols", "xml" - they will never see/make use of it.
BTW "protocol" is outdated term Special:WhatLinksHere/Protocol. Glossary is outdated - but I cannot fix all references by myself. Xxzme (talk) 14:10, 7 May 2015 (UTC)

WIP:

articles in beginners cats should be included in Begginner's guide:

Beginners Guide 1.3 still refers to "closed way"... Xxzme (talk) 16:18, 7 May 2015 (UTC)

Defining elements

I would like to clarify the term "elements". The page states

Elements are the basic components of OpenStreetMap's conceptual data model of the physical world.

If that holds true, neither areas nor presets are elements. When @Minh Nguyen: added presets to Template:Elements I did not necessarily disagree, but I think presets are not elements by this definition. It is something like a semantic group of tags and thus an extended concept. I propose to limit the term "element" to those three elements that fit into the definition. Then state that tags might also define the geographical feature (think of area=yes and type=multipolygon). I would contrast semantic elements and elements here.

Most of this is already written down, I basically want to link the terms and be more consistent about the definition of the "element" term. To visualise the proposal, I created the following proposal for Template:Elements:

Any comments or objections? --Tigerfell This user is member of the wiki team of OSM (Let's talk) 13:54, 22 October 2020 (UTC)

Oh sure, I didn't mean to imply that presets are elements, or that tags are elements for that matter. Breaking the navbox into several subtopics makes a lot of sense. It also makes room for informal or historical concepts like area and segment. As for the title, how about something like "OpenStreetMap data model", since not all of these concepts are geographic? – Minh Nguyễn 💬 00:47, 26 October 2020 (UTC)
Great, I would add segments to the elements, but indicate that they do not exist any more. "OpenStreetMap data model" sounds good. --Tigerfell This user is member of the wiki team of OSM (Let's talk) 10:39, 28 October 2020 (UTC)