[OSM-dev] Rantings about API 0.6

Iván Sánchez Ortega ivan at sanchezortega.es
Wed Feb 11 01:43:39 GMT 2009

El Miércoles, 11 de Febrero de 2009, Brett Henderson escribió:
> > I'm importing brand new data, so populating the history tables is no big
> > deal.
> Perhaps I've misunderstood you but populating the history tables is very
> important.

I'm afraid we have a little misunderstanding here :-)

For *new* nodes/ways/relations, the only thing an importer has to do is insert 
one record in the {node|way|relation} table, and the *same* record in the 
current_{node|way|relation} table. And ensure that the version number is "1" 
in both records.

Inserting two entries per object and setting the version (AKA "populating the 
history tables") is, as you can see, no big deal. It got coded in a jiffy.

(I fail to see why we have to duplicate data here, anyway - I don't know 
whether it would be performance-wise to just store the historic information, 
and make the API fetch only the last version; or do as now, but not keeping 
the last version in the historic tables)

Iván Sánchez Ortega <ivan at sanchezortega.es>

Whenever you find that you are on the side of the majority, it is time
to reform.
		-- Mark Twain
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20090211/c3f2e418/attachment.pgp>

More information about the dev mailing list