Re: [OSM-talk] A proposal to improve relation handling

2011-08-24 Thread NopMap

Frederik Ramm wrote:
 
 2. Treat relation membership as a characteristic of the members.
 
 I do not think this is a good idea. It seems conceptually wrong to me. 
 If the public transit authority creates a new bus route, does that 
 really change all the roads along which the bus runs? Is the road any 
 different on the ground the day after the bus route has been introduced?
 

I believe the answer is somewhere in between. It is true that adding it to a
relation is not a change to the core data of a way. But having an indication
in the way that relations exist and which ones they are would be a
tremendous improvement for handling and understanding the data. Especially
if you are not a power mapper and are not even aware that the object you are
handling may be involved in relations or if you do not have a local PostGIS
database or a complex editor to already do the searching for you.

Maybe the way to go is an optional part with metainfo about relation
membership which can be requested with an additional parameter or alternate
call. The API should have that information readily available when it
compounds the data.

In any case, such double linking information should be ignored when an
object is uploaded to the API to avoid conflicts between way-relation and
relation-way linking.

bye
Nop


--
View this message in context: 
http://gis.638310.n2.nabble.com/A-proposal-to-improve-relation-handling-tp6714787p6719356.html
Sent from the General Discussion mailing list archive at Nabble.com.

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] A proposal to improve relation handling

2011-08-23 Thread Frederik Ramm

Hi,

On 08/23/11 06:53, Nathan Edgars II wrote:

(Note that I am not a coder and the rather rude response to 'write a
patch' will get you nowhere.)


If you cannot write code yourself, there's always the option of finding 
someone else who does it for you ;)



1. Handle conflicts better. Treat the relation members as a
comma-separated list, and apply each diff independently (this would
probably need some checking that they are not too close to each other).


I believe Matt has some ideas about incrementally editing objects for 
API 0.7. This would not be relation specific and certainly not about 
comma separated lists but might go a little way in your direction.



2. Treat relation membership as a characteristic of the members.


I do not think this is a good idea. It seems conceptually wrong to me. 
If the public transit authority creates a new bus route, does that 
really change all the roads along which the bus runs? Is the road any 
different on the ground the day after the bus route has been introduced?



1. Handle conflicts better. If a conflict still happens, make it easier
to see what members are added or removed without caring about the order.


Handle conflicts better is always good ;) however it seems to me that 
you should broaden your view a bit as to the different types of 
relations that exist; there's much more than route relations which seem 
to be the focus of your ideas.



2. Treat relation membership as a characteristic of the members. Put the
relation among the other tags with only a minor notation that it is not
a standard tag,


I think Potlatch2 goes in that direction. Have you tried it? I don't 
think all editors should necessarily be the same - if Potlatch2 presents 
things in a way that you like, there's no need to make all other editors 
to do the same I'd say.



*A third field will appear; fill in east.


I never quite understood this directional role business. Seems to be an 
US specialism?


Bye
Frederik

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


[OSM-talk] A proposal to improve relation handling

2011-08-22 Thread Nathan Edgars II
I and some other mappers have noticed that relations are more prone to 
breaking than equivalent tags on ways.
(For a simple example, imagine two people simultaneously editing 
different parts of a route and each splitting a way, e.g. to add a 
maxspeed to a portion. If the route is stored as a relation, the second 
one to upload will get a conflict, and relation member conflicts are 
rather difficult to resolve. On the other hand, if the route is stored 
as ref tags on the ways, no conflict will result.)


Another problem is that relations are harder for new mappers to work 
with than tags. If you want to say that a way is part of Vermont Route 9 
with tags, you simply add ref=VT 9. But if you want to use a relation, 
you first need to find the relation ID or a way that already has it, 
then add the way to it.


I am going to propose improvements to the API and to editing software 
that will make relations easier to work with and less prone to breakage. 
(Note that I am not a coder and the rather rude response to 'write a 
patch' will get you nowhere.)


;API changes
1. Handle conflicts better. Treat the relation members as a 
comma-separated list, and apply each diff independently (this would 
probably need some checking that they are not too close to each other). 
Similarly, if one person only changes the tags and the other the 
members, do not throw a conflict. (This sort of thing could also help 
minimize conflicts on ways.)
2. Treat relation membership as a characteristic of the members. Each 
revision of each member includes a separate field that stores what 
relations it is a part of. When an object is downloaded, the list of 
relation IDs it is a part of is included (and perhaps so is the type of 
relation - route, multipolygon, etc. - this needs more thought). On 
uploading a change in membership, the editor will send this field (if 
nothing else is changed, the other tags do not need to be uploaded) and 
a conflict can occur on this field. Perhaps, for backwards 
compatibility, a relation change can be uploaded without this field, but 
it will always 'lose' a conflict even if saved before a change that 
contains the field.


;Editor changes
1. Handle conflicts better. If a conflict still happens, make it easier 
to see what members are added or removed without caring about the order. 
Perhaps use the field from API change 2 to improve the process.
2. Treat relation membership as a characteristic of the members. Put the 
relation among the other tags with only a minor notation that it is not 
a standard tag, and with three columns instead of two (e.g. network, 
ref, role). Make the process of adding an object to a relation 
essentially the same as that of adding a tag. For example, the following 
could be the method in which a way is added to the relation for Vermont 
Route 9 with role east (the relation will have tags network=US:VT and 
ref=9):

*Select the way.
*Click the same button or press the same key as when adding a normal tag.
*Fill in the first field as US:VT. (Perhaps the editor realizes that 
this is a relation network, but more likely a box will have to be 
checked that a relation is being used, absent a regional plugin that 
will recognize certain networks.)

*Fill in the second field as 9.
*A third field will appear; fill in east.
*Now the editor finds a relation with network=US:VT ref=9. If none is 
loaded, a new type of API call will be made to find it. If none is 
found, a new one will be created.

It's possible that this will need regional presets to work properly.
3. Change uploading to comply with API change 2.

Editor change 2 is most important for making relations easier to work 
with. The other changes are important for making conflicts less frequent 
and easier to handle when they do appear.


Any comments?

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk