Coder Social home page Coder Social logo

xoolive / cartes Goto Github PK

View Code? Open in Web Editor NEW
43.0 3.0 0.0 7.21 MB

Create great maps in Python ๐Ÿ with openstreetmap ๐ŸŒ

Home Page: https://cartes-viz.github.io/

License: MIT License

Python 100.00%
maps openstreetmap gis altair cartopy geopandas geospatial

cartes's Issues

Geometry missing while overpass shows the geometry

Hi I am trying to do this query where I have some admin_level=6 parts and some level=7:

sh_area = Overpass.request(
    area={"name": "Schleswig-Holstein", "admin_level": 4},
    rel=dict(boundary="administrative", admin_level=dict(regex="[6-7]")),
)

However I run into the issue that for some reason the admin_level=6 areas dont have data in the geometry column while on overpass they do get rendered as expected. https://overpass-turbo.eu/s/1pU9

image

image

Any ideas why this happens and how I fix this issue?

Bump into AttributeError: 'Series' object has no attribute 'is_empty' when trying to display simple things

Just trying to reproduce demos like airport layout.
It seems that
airport = Overpass.request(area=dict(iata="BRU"), aeroway=True)
does not fetch data. Possible? How can I check?
Then, for any simple display, it never goes through

if x.shape[0] > 0 and "geometry" in x.columns:
---> 75             x = x.query("geometry == geometry and not geometry.is_empty")
     76             if x.shape[0] > 0:
     77                 data.loc[x.index, ["latitude", "longitude"]] = x.assign(
     78                     longitude=lambda df: df.geometry.centroid.x,

with above error.
I have the feeling data is not fetch. How can I proceed to debug this?
Seems an Overpass issue, other osm stuffs go through (Nominatim, for example)
Thank you for double checking.

Python 3.10, pip installed traffic, cartes, no more.

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.