Giter Club home page Giter Club logo

Comments (2)

bcamper avatar bcamper commented on May 14, 2024

Hi Till -- the inner ring information is encoded in the vector tiles, but the confusion probably arises from how this data is stored natively in OSM. "Proper" GIS polygons have a concept of multiple rings in a single polygon (not multipolygon!), where the first ring is the outer ring, and subsequent rings are inner rings which are "cut out" of the outer one. A multipolygon is a separate concept, for spatially disjoint polygons (each of which can have its own outer and inner rings).

Since OSM only has single-ring "ways", they have no native way of encoding multi-ring polygons, hence they use what they call "multipolygon" relations to encode this information. When this data is imported into postgis with osm2pgsql, those OSM multipolygon relations get converted into multi-ring polygons, or true multipolygons where they do not overlap. Some info in the docs here.

In these vector tiles, those features are exposed as GeoJSON polygons (which can have multiple rings, as in the building example you give) and disjoint multipolygons. You can see that building rendering correctly with inner courtyards here: http://tangrams.github.io/tangram/#mapzen,52.49877546805041,13.397671580314638,17

Hope that helps! I'm going to close this issue but feel free to follow up with any clarifications or issues here. Thanks.

from vector-datasource.

tillnagel avatar tillnagel commented on May 14, 2024

Oh boy. Thanks very much for the explanation. I forgot about them. (It just seems so unsemantic.)

Anyway, glad to hear. Then it's simply a bug in my GeoJSON parser.

from vector-datasource.

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.