kj-9 / prettymapp

🖼️ Create beautiful maps from OpenStreetMap data in a streamlit webapp
0 stars 0 forks source link

Water area does not appear properly #1

Open kj-9 opened 1 year ago

kj-9 commented 1 year ago

If you extract geometries using tags as follows:

lc = {
    "water": {
        "natural": ["water", "bay"],
        "place": ["sea"],
    },
}

aoi = get_aoi('shikano shima, fukuoka, japan', rectangular=True, radius=1000*10)
gdf = get_osm_geometries(aoi, lc)
fig = Plot(
    df=gdf,
    aoi_bounds=aoi.bounds,
    draw_settings=STYLES["Peach"]
).plot_all()

flt

Then the water area will not appear unless these tagged polygons are defined. It will be rendered only as background since "water," "bay," and "sea" are not defined as complete polygons of the world's seas.

If you use the tag "natural": ["coastline"], it will only extract lines instead of polygons (sometimes complete polygons for small islands), which is not useful to represent a water area. It is just a line, not an area.

lc = {
    "coast": {
        "natural": ["coastline"]
    }
}
aoi = get_aoi('shikano shima, fukuoka, japan', rectangular=True, radius=1000*10)
gdf = get_osm_geometries(aoi, lc)
gdf.plot()

image

kj-9 commented 1 year ago

stackoverflow asnser: https://stackoverflow.com/questions/62285134/how-to-fill-water-bodies-with-osmnx-in-python