[OSM-dev] Osmosis: Filter way/node *without* key x

Brett Henderson brett at bretth.com
Thu Feb 12 22:27:21 GMT 2009

Lennard wrote:
> Brett Henderson wrote:
>> You cannot filter a changeset by polygon because a changeset doesn't 
>> contain enough information, all nodes for changed ways may not be 
>> included in the file therefore the location of ways may not be known.
> Would it be a workable option to have fully referenced diff files, 
> next to the current sparse format?
Anything is possible but for complexity and performance reasons it's not 
trivial.  Currently osmosis runs through the database history tables and 
extracts records that were created in the change interval of interest.  
(ie. a SQL WHERE clause specifying a timestamp in a certain range).  It 
does that separately for nodes, ways and relations.  To create a fully 
referenced diff file would require osmosis to read the ways, then read 
the nodes, then go and load all the other nodes that were referenced by 
ways but not found in the first pass.  Fully referenced relations would 
also require something similar but it gets slightly more complicated for 
them.  The current number of queries is fixed at one per table.  This is 
likely to drastically increase that.
> Would there be a lot of overhead in generation and/or filesize?
So yes, a large overhead in generation.  I suspect filesize wouldn't be 
too badly impacted but I don't have any numbers.
> With the current interest in hourly/minutely updated maps, this seems 
> to me to be an interesting option for people that don't or can't load 
> the whole planet.
You can still apply full planet changesets to your local file then run 
the result through a bounding box to remove unwanted data.


More information about the dev mailing list