Talk:Relations/Relations are not Categories
I understand your frustration. Perhaps it's not just users' Wikipedia habits, but something not-quite-intuitive about relations? That would be another way to see this issue. Just suggesting, and spraying plenty of eu de toilette on myself at the same time. :~) --Hubne 12:16, 18 November 2008 (UTC)
I understand and agree that the footways example shouldn't be relations (except when "Footways in East Anglia" is some kind of network of signed footways, in which case not all footways in East Anglia are part of it, just those belonging to the network).
Now, for the HSBC ATMs I disagree: these ATMs obviously belong together in some special way, and the operator=HSBC can better be moved to a higher level, since it's actually much easier to misspell HSBC. It's really not making it difficult for editors to put these in relations. And I guess that's the main issue you have with relations? That newbies wouldn't be able to handle them, so we have to not use them whenever we can? --Eimai 13:16, 18 November 2008 (UTC)
- One of the main issues is that the OSM clients and server do not cope well with large objects, such as a massive relation containing thousands of ATMs. Therefore you should either a) avoid creating large objects, or b) fix all major software and clients for this not to be a problem. I suspect a) will be easier. :) --Richard 13:51, 18 November 2008 (UTC)
- Yeah, (a) is easier, but I doubt you seriously think it's the better solution as well... Relations with so many objects already exist and there will only be more of them in future, making it necessary to do (b) anyway or we'd end up with a server and clients that can't handle OSM data. --Eimai 14:37, 18 November 2008 (UTC)
- I do seriously think it is the better solution. Working with big objects is never good. Hardware and bandwidth are always finite, and we should keep the barrier to entry for new clients low, rather than requiring ever-more complex programming. Plus, if our (very few) developers are to spend time improving their clients, I would far rather they spent it on UI and accessibility. Infinite-size relations count as "nice to have", not "must have".
- Most "large relation" problems could be solved by use of XAPI (or a similar service); better tagging; or nested relations - and client support for the latter would be a more sensible thing to spend developer time on.
- We have already seen several problems with the server/connection/client timing out due to ridiculously large objects ( is one example), with data being lost as a result. API 0.6 will impose a maximum way length and I hope there will be a maximum relation size, too. --Richard 15:55, 18 November 2008 (UTC)
- Well, you can't impose a maximum relation size since the ways to have a tree-like structure for relations aren't ready yet, and then you'd need to adjust all clients anyway to easily allow relations in relations, and all renderers to make use of it. And I don't understand why it's needed to download/upload entire objects anyway, if you have a route relation of 5000km and just see a kilometer of it in your editor, you don't need any notion of the other 4999, right? The great thing with relations is that it's based on objects that have a location, i.e. nodes and ways. So once you know which nodes are in view, you know the ways you need, and with that you can get a list of relations. So no need to download full relations if you know their identifiers, just download their keys and values.
- I don't have a lot of knowledge on the API right now, but is there really no option to just download the keys and values and not the members? --Eimai 17:17, 18 November 2008 (UTC)
- Well, to some extent - but all sorts of things start causing problems in that case. Our software isn't sufficiently robust to download objects of that size, even ignoring the dependencies. We have a situation right now where someone has (by accident) deleted a relation - a European road, I believe - but the history can't be recovered because the XML parser blows up trying to assemble a document that large. --Richard 22:43, 18 November 2008 (UTC)
- Of course we can impose a maximum relation size, and we will. If you want to model something with more than 1,000 members then OpenStreetMap is, at present, not the right tool to do it. Better turn away some users and their ideas of data modelling than risk breaking it for the rest of them. --Frederik Ramm 04:16, 28 November 2008 (UTC)
On Talk:WikiProject Europe/E-road network there's currently a discussion going on, whether there should be a relation which contains all the routes or not. As we can talk to "those who invented relations" here, I want to ask you, what is your opinion. My opinion: I'm strongly in favour of a relation which connects these routes, because you have to save the name of the network only once (but in different languages) and you can have one website (if a tag for this gets finally accepted). And you can define a common layout for the icons, ... So ... what are your opinions on this topic? -- Skunk 10:29, 14 December 2008 (UTC)
- We already have a precedent: use the 'network' tag. The National Cycle Network in the UK is defined by "those ways in the UK bounding box belonging to a relation with network=ncn". The E-road network in Europe should be the same. --Richard 15:15, 21 December 2008 (UTC) (who didn't invent relations, but whose editor popularised them ;) )
- I think, this is a bad database model. Do applications really have to keep their own database of possible networks? (somebody might want to know the name of the 'e-road'-network). -- Skunk 08:00, 31 December 2008 (UTC)
I was thinking about this whole issue. As I already wrote in E-Roads, to have a relation would allow to collect information about a network at one place. To take the example of the HSBC-ATMs: In the relation we can collect the name of the company in different languages next to the website maybe an address and so on (just examples) - it's much more powerful. I accept that having a relation of all ATMs of HBSC would be very bulky. Why not introduce 'reverse relations' for these cases? There you would apply the membership to the members. The member would hold the information that e.g. 'operator' references some reverse-relation. E.g. operator='#12345' - the reverse-relation 12345 holds all important information. E.g.
- Node 1 (name='ATM1', lon/lat=somewhere, operator='#12345')
- Node 2 (name='ATM2', lon/lat=somewhere, operator='#12345')
- RevRel 12345 (name='HSBC', website='http://www.hsbc.com', ...)
-- Skunk 09:43, 21 December 2008 (UTC)
- I've been thinking exactly the same thing; a way to represent non-spatial entities relevant to the spatial ones we are mapping. Since 'Reverse Relation' is a bit bulky, maybe 'Entity' would be a better name for it. --Hai-Etlik 07:50, 3 March 2011 (UTC)
Link to the solution is missing
The link to the Xapi explanation is missing and the Xapi explanation is not translated at all. No wonder that relations are used. --Lulu-Ann 13:19, 9 January 2009 (UTC)
Subway entrances and subway stations
Quote from the text of the page : They are meant to model a close (and usually local) relation between objects, for example: This entrance leads to that subway station
I wholeheartedly agree that this is an extremely useful use of relations :) especially at large stations where several modes of transport interconnect, - it is common to have a bus station, a tram stop, a commuter rail and a mainline station within the same complex and with extremely similar (if not similar) names. A local example for me is the Gare du Nord/Magenta complex in Paris.
However, none of the four established types seems to fit and I haven't been able to select a corresponding type in the proposed ones - of which "site" would seem to be the best match, but there again I'm unsure.
What is your opinion ? I'd be especially interested to hear the writers of the original piece that is featured on this page, since they themselves pushed forward this use of relations !
--232 U 1 19:30, 12 January 2009 (UTC)
What is "HSBC ATM machines"?
Could anybody explain the term "HSBC ATM machines"? I know, that HSBC is the world's largest banking group. Thank you! -- 20:06, 22 March 2009 (UTC)