[OSM-dev] API 0.6: Changeset Access
80n
80n80n at gmail.com
Wed Jan 28 13:56:45 GMT 2009
On Wed, Jan 28, 2009 at 1:06 PM, Brett Henderson <brett at bretth.com> wrote:
> 80n wrote:
>
>>
>> Replication of changesets is on my undocumented long term TODO
>> list for
>> osmosis (I should add it to trac) but I don't know when I'll be
>> able to
>> do it. I had some discussions with Shaun and Matt a while back on how
>> this might be done efficiently. Identifying changesets for
>> replication
>> is a bit tricky and would probably involve two passes, first pass
>> would
>> identify all changesets created in a time interval, and the second
>> pass
>> would identify all changesets modified (ie. have entities referring to
>> them) in a time interval. Once identified they could be read and
>> included in a changeset file just like any other entity.
>>
>>
>> Perhaps you only need to worry about exporting the changeset headers. The
>> members of a changeset can be derived from the elements themselves.
>>
> Yes, that is fine, in fact I think that's what we were planning to do ...
> my memory is hazy :-) The header info is the difficult bit because it
> changes over time. From memory (I don't have the schema handy) the main
> issue is the bounding box fields. These can be updated over time as new
> entity updates are added to the changeset. I agree that only the header
> info needs to be extracted, but it needs to be included in every changeset
> that has an entity referring to it in case the bounding box was updated
> since the last replication.
>
> Is the bounding box info updated within the same transaction as entity
> updates or can it be updated asynchronously with a separate daemon? I
> remember discussions about bbox updates only occurring occasionally (ie. the
> bbox is made slightly larger than necessary to avoid large numbers of
> writes) but I'm fairly sure they're updated synchronous at the same time as
> the entity causing the update, at least I hope so.
>
The bbox can also be derived from the changeset members so that's not really
essential either. The rest of the header probably won't change
significantly, if at all, during the life of a changeset.
I think you could just query the api directly, the changeset ids will be
allocated sequentially. As changesets are automatically closed after 24
hours, a second query process running 24 hours behind can re-query each
changeset and be sure that it will no longer change.
>
> Brett
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20090128/6ddbd61b/attachment.html>
More information about the dev
mailing list