[OSM-dev] Fwd: Osmosis - Cutting out a bounding box from a diff file (.osc)

Stéphane Henriod s at henriod.info
Wed Sep 5 14:28:25 BST 2012


I think I will go for your second option: remove every way with no node in
the bbox.

Increasing the storage capacity is unfortunately not possible for now
(mutualized server) and, anyway, it wouldn't make so much sense: I want to
have only data for one region in my database and, like this, I will end up
with the full planet (as every single node in OSM might be modified one day
or the other...)

By the way, would this be a bug or a request of improvement for osm2pgsql
or osmosis?

   - osm2pgsql: actually use the --bbox option when applying a diff file to
   the database
   - osmosis: allowing to extract part of a diff file based on a bbox

Cheers

Stéphane
--
"Le mot progrès n'aura aucun sens tant qu'il y aura des enfants malheureux"
-- Albert Einstein

"A journey does not need reasons. Before long, it proves to be reason
enough in itself. One thinks that one is going to make a journey, yet soon
it is the journey that makes or unmakes you." -- Nicolas Bouvier

Photos de voyages, photos de montagne: http://www.henriod.info



On Wed, Sep 5, 2012 at 3:14 PM, sly (sylvain letuffe) <liste at letuffe.org>wrote:

> > But it looks like I have a problem now...
> >
> >    1. I need to keep the tables ways, rels and nodes because of the diff
> >    updates
> >    2. Those 3 tables will continue growing up with each new diff, until I
> >    reach the storage capacity of the server
> >
> > The only solution I see
> is to increase the storage capacity ;-)
>
> > is a post-processing that will erase from PostGIS
> > all the nodes lying outside my bounding box + all the ways using one of
> > thses nodes + all the relations using one of thses nodes or one of these
> > ways.
>
> Doing that will erase data that you want in your bbox, suppose a way
> crossing
> the border of your bbox, it will be erased while it still had nodes in the
> bbox.
> A better but longer solution is to remove every ways with no nodes in the
> bbox.
>
> But that probably won't be as easy as it sounds. Better increase you
> storage
> capacity ;-)
>
> --
> sly
> qui suis-je : http://sly.letuffe.org
> email perso : sylvain chez letuffe un point org
>
> _______________________________________________
> dev mailing list
> dev at openstreetmap.org
> http://lists.openstreetmap.org/listinfo/dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20120905/85a05582/attachment.html>


More information about the dev mailing list