Git Product home page Git Product logo

Comments (4)

woodpeck avatar woodpeck commented on May 23, 2024

The .bz2 file on the Geofabrik server does contain the relation you are looking for:

$ bzgrep 'id="56389"'  oberbayern-latest.osm.bz2
    <relation id="56389" version="25" timestamp="2012-12-16T09:21:11Z" changeset="14290051" uid="130472" user="fx99">

It seems your download is faulty. Don't be confused by the negative IDs, they are created by osm2pgsql automatically from positive relation IDs in the downloaded file. Also, you should use the .osm.pbf and not the .osm.bz2 - same data, smaller file, faster loading.

from osm2pgsql.

michael-hy avatar michael-hy commented on May 23, 2024

Thanks for your help but i do not understand completely what you mean. So you grep the file and then you get a matching line. So doesn't this mean that the relation is included? I did the greping again, look:

bzgrep -A 29 'id="56389"'  oberbayern-latest.osm.bz2                                                                                                                            
        <relation id="56389" version="25" timestamp="2012-12-16T09:21:11Z" changeset="14290051" uid="130472" user="fx99">
                <member type="way" ref="28823678" role="outer"/>
                <member type="way" ref="30033834" role="outer"/>
                <member type="way" ref="195085889" role="outer"/>
                <member type="way" ref="196473438" role="outer"/>
                <member type="way" ref="194705249" role="outer"/>
                <member type="way" ref="195085890" role="outer"/>
                <member type="way" ref="69685291" role="outer"/>
                <member type="way" ref="69685244" role="outer"/>
                <member type="way" ref="30101361" role="outer"/>
                <member type="way" ref="196473436" role="outer"/>
                <member type="way" ref="45048519" role="outer"/>
                <member type="way" ref="194705245" role="outer"/>
                <member type="way" ref="196167289" role="outer"/>
                <member type="way" ref="196473435" role="outer"/>
                <member type="way" ref="42941597" role="outer"/>
                <member type="way" ref="30033065" role="outer"/>
                <member type="way" ref="30033066" role="outer"/>
                <member type="way" ref="196328310" role="outer"/>
                <member type="way" ref="196328308" role="outer"/>
                <member type="relation" ref="66998" role=""/>
                <member type="relation" ref="66999" role=""/>
                <member type="relation" ref="67000" role=""/>
                <tag k="admin_level" v="9"/>
                <tag k="boundary" v="administrative"/>
                <tag k="is_in" v="München,Bayern,Bundesrepublik Deutschland,Europe"/>
                <tag k="name" v="Stadtbezirk 04 Schwabing-West"/>
                <tag k="note" v="München, Stadtbezirk 4, 3 Bezirksteile"/>
                <tag k="type" v="multipolygon"/>
        </relation>

Thanks for the tip with pbf format. But can you also extract it on the fly for osmosis, then filter and then compress it again. All through pipes (like: bzcat myfile | osmosis filter stuff | bzip > myfilteredfile). I dont have much hdd space, so i need to process stuff in ram.

from osm2pgsql.

woodpeck avatar woodpeck commented on May 23, 2024

Ah, sorry. I misunderstood - I thought that you were missing the relation in the XML file! But now I see the relation was there in your XML but not imported.

from osm2pgsql.

apmon avatar apmon commented on May 23, 2024

It works with hstore enabled (-j) but not without. I'll need to investigate what happened there, but I am traveling, so won't get to it until next week.

from osm2pgsql.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.