[OSM-dev] preconditions_ok? in app/models/relation.rb and way.rb

Mitja Kleider mitja at kleider.name
Sun Aug 22 17:24:44 BST 2010


Richard Fairhurst wrote:
> I think you're misreading how the relation integrity checks work. The
API
> only checks whether an entity is still visible when the entity is
_added_
> to a relation. 
> For performance reasons, it does not check the entities
> formerly in the relation.

Thanks for clarifying. That is probably the cause.


> It assumes that they're ok, which in the case of historic
> (pre-integrity check) data may not be the case. See preconditions_ok? in
> app/models/relation.rb in the Rails port for the code.

When were the integrity checks introduced?

Are you sure that checking only _added_ entities is enough? I read it like
that: for performance reasons the checks are done when the entity is
deleted (way node in the next case).

Looking at the other example
("http://www.openstreetmap.org/api/0.6/way/60263972/1"), the deleted nodes
contained in that way (e.g.
"http://www.openstreetmap.org/api/0.6/node/338392109/5") were deleted May
2010 (2010-05-26).

In my understanding it still should not have happened, or am I missing
something?


Mitja



More information about the dev mailing list