Code Monkey home page Code Monkey logo

basemaps's People

Contributors

aussiegeek avatar bdon avatar cashc avatar dependabot[bot] avatar edefritz avatar eikes avatar heikogr avatar jamesscottbrown avatar lenalebt avatar msbarry avatar nvkelso avatar tyrauber avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

basemaps's Issues

Compilation error

When trying to execute this command:" mvn clean package "

I get this error:
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project protomaps-basemap: Fatal error compiling: error: invalid target release: 16

I solved this after upgrading to Java 17.

Now works as expected.

POI for way with `shop=supermarket` is missing

https://www.openstreetmap.org/way/87991871 is a way which is tagged as shop=supermarket. The protomaps basemap includes nodes with this tag in the POI layer, but ways seem to be missing, at least the above supermarket does not show up in the basemap (https://protomaps.github.io/PMTiles/?url=https%3A%2F%2Fr2-public.protomaps.com%2Fprotomaps-sample-datasets%2Fprotomaps-basemap-opensource-20230408.pmtiles#map=17.43/47.546268/7.952184)

@nvkelso do you plan to fix this in #47?

Thanks for all your work @bdon and @nvkelso. Will be an awesome basemap!

How to use mapbox styles?

In addition to using several themes in basempa, how can I customize my own theme? For example, when I use existing mapbox styles or openmaptiles styles, the display of pmtiles is abnormal. How can I modify the style of mapbox、openmaptiles, or is there a conversion tool?

image

demo not working

it seems that https://protomaps.github.io/protomaps-themes/base/dist/index.js is missing (and other errors cascade from that)

Add easy option to toggle business listings at zoom 15+

In the v3 schema we introduce many more business listing POIs at zoom 15+ (earlier in the data, later in the style). Right now they are text only labels, but soon they could also include artwork icons.

We could consider a config option to:

  • Show these new POIs at later zoom than 15
  • Disable them completely

This would reduce the visual noise at this zoom – which is now more comparable to Apple Maps or Google Maps while before it was more for a pure data viz use case.

Buildings are merged too much

At z15, buildings that do not touch should not be merged. However, they are in some places.

Example in Monaco:

Good:

https://www.openstreetmap.org/#map=19/43.74036/7.42210

image

Bad:

http://[::]:8080/data/basemap/#19/43.7403607/7.4220951

image

steps

java -cp target/*-with-deps.jar com.protomaps.basemap.Basemap --input data/sources/monaco.osm.pbf --output data/basemap.mbtiles --download
docker run --rm -it -v "$(pwd)/data":/data -p 8080:8080 maptiler/tileserver-gl -p 8080

Places layer flickers at NE to OSM zoom transition

Feedback: The one thing that really jumps out at me is all cities disappearing and reappearing as you go from z5 to z6. My guess is this is something like transitioning from Natural Earth to OSM gives slightly different coordinates? (which is enough to trigger the flash because MapLibre treats it as a new label if the coordinates aren’t very close between zoom levels)

I see 2 different solutions:

  1. Remove the NE cities from tiles and unclamp the OSM cities to allow them to show up at low zooms (when their min_zoom from the NE data join makes them eligable). This fixes the "different coords, diff properties" problem that MapLibre has, so should remove the flicker.
  2. Keep the NE cities and join them to OSM places and use the OSM lat/lng at low zooms.

Tile size is implicated because the NE places at low zooms now include only ~ 25 name localizations, versus the hundreds in OSM.
So with option 1 you'd need to introduce an allowlist of name localization (at all or just low zooms).

With option 2 the join already works between OSM to NE, so we'd also add it the other direction in the NE function.
There are an unknown number of places in NE that aren't in OSM or aren't part of the data join, probably in the order of 2%.
Generally I lean towards option 1 because it simplifies the Places layer logic, but the OSMNames logic would need to grow more complex (which should happen anyhow).

Layer Documentation and Build Instructions

Protomaps is great. The idea of compiling all the map data, at any zoom, into one file is awesome. Being able to switch map styles by loading different sources and different themes is compelling. The chief issue is standardizing the layer structure.

Right now, the easiest way to build pmtiles from OSM data, is to download a .pbf, convert it to a .mbtiles file with tilemaker and the default layer, schema, and then use go-pmtils to convert that to a .pmtiles. Unfortunately, this approach is not compatible with protomaps-themes.

The following schema, config-openmaptiles.json,
process-openmaptiles.lua with tilemaker builds mbtiles from osm.pbf that can be converted to pmtiles.

tilemaker --input osm.pbf \
--output osm.mbtiles \
--config config-openmaptiles.json \
--process process-openmaptiles.lua
pmtiles convert osm.mbtiles osm.pmtiles

Bases on this comment here, it seems that protomaps-themes layer structure is not compatible with openmaptiles layer structere.

This raises the question: If the goal is standardization, why not embrace the OpenMapTiles?

If this schema functionality doesn't meet the functional requirements of Protomaps, what are those requirements?

And more importantly, what are the build instructions for created protomap-theme compatible pmtiles?

Clipping to AOI

Instead of all global (OSM Water, NE) features appearing at 0,0,0, every tile in a non-planet build should be intersected with a passed AOI. The AOI can be passed on the command line via GeoJSON.

I believe this is possible using only the public Planetiler APIs like postProcess, but it will require some tricks to make it efficient.

Does this library work with the `pmtiles` protocol extension for MapLibre GL?

Hello! Thanks for making this project, it seems awesome! I recently saw this article and I'm trying to reproduce it.

I'm trying to set up a project using protomaps and MapLibre GL.

I've generated a .pmtiles file through OpenMapTiles and go-pmtiles convert, and the file seems to contain the correct content according to the inspector tool:

image

However, when I switch out the MapLibre GL style to use my .pmtiles file, the map doesn't render anything in the region:

image

I didn't see any examples in the doc of using both the pmtiles extension and protomaps-themes-base, but are they expected to work together?

My full repo can be found here, and the
code in question is here

Thanks in advance!

Road casings ordering leads to "bridge" like rendering

Right now all road casings are rendered just before the road type they belong to. This leads to some weird effects at intersections between different road types (minor-medium/medium-major ...), where it appears that the higher class road passes above the lower class road, instead of being just a regular intersection.

Screenshot 2023-06-12 at 11 13 25 Screenshot 2023-06-12 at 11 13 38

I'm not a cartography expert, but I think road casings should all be rendered before (below) any of the roads. I will propose a PR later today, if that's ok.

Consider adding sports, craft, and historic tags with raw coalesce option for kind/tag

In the closed PR, @tyrauber noted that the sports, craft, and historic tags could be exported in raw form as well, and added to the coalesce of values in the exported pmaps:kind property.

There's another interesting idea here which is to always pass thru the raw values of the tags in a new pmaps:tag property – since the pmaps:kind property is an gated allowlist of properties (else "other" when not in the allowlist). Adding this would facilitate data-driven icon lookups based on single property instead of a list of properties.

From the original PR comment:

          Hi @nvkelso, it looks @bdon has already addressed my suggestions on main!
  • stars are applied to point features as stars:
           point_feature.setAttr("stars", sf.getString("stars"));
  • pmap:tag is not necessary because tag values can be accessed by key name:
          .setAttr("amenity", sf.getString("amenity"))
          .setAttr("shop", sf.getString("shop"))
          .setAttr("railway", sf.getString("railway"))
          .setAttr("cuisine", sf.getString("cuisine"))
          .setAttr("religion", sf.getString("religion"))
          .setAttr("tourism", sf.getString("tourism"))
          .setAttr("iata", sf.getString("iata"))

It's missing the sports , craft and historic tag. Sports and craft are probably unnecessary, but for tourism implementations, I'd probably add historic.

All in all the implementation on main is more flexible than the approach I came up with. 👍 Closing.

Originally posted by @tyrauber in #32 (comment)

Load places from Natural Earth at project init

To get consistent min_zoom values between NE and OSM data we do a live data join. But that data join is always reading in NE data instead of just once.

The current config doesn't seem to noticeably affect build time so it's probably OK as is?

But it's better architecture to only load it once on project init. We can file a followup issue for that?

Originally posted by @nvkelso in #93 (comment)

Map of Germany

Hi, I love pmtiles as it works fast and easy. I need a map of Germany and on photomaps.com you can only download a world map (which is way to big in file size) or smaller local maps.

Whats's the best way to get a map of a country like Germany. I just need the normal basemap with street names with out POIs. Thanks!

Distinguishing railaway tunnels

Would it possible to mark railaway tunnels as tunnels or underground structures? Possibly by setting pmap:level like it is done for road tunnels.

Currently in OSM they have "layer" set to -1 and "tunnel" to "yes".

Places layer localities reset min_zoom to 8 at zoom 7

The earlier (and smaller value) zooms from Natural Earth from zooms 0-6 are lost on zoom in.

For New Delhi in India this means the locality which had a pmap:min_zoom of 2.0 reset to 8.0, which compares unfavorably to Delhi the region that has a pmap:min_zoom of 4.6.

As a result the New Delhi locality is collided in error by the Delhi region label for several zooms from 7 until room opens up.

A solution is to do a data join in the places layer for locality features between NE and OSM, and prefer the NE min_zoom values.

image

What is the correct way to create pmtiles?

Hi,
I am trying to create pmtiles from a osm.pbf file (from Geofabrik).
I tried two ways:

  1. tippecanoe -o output.mbtiles -zg --drop-densest-as-needed --extend-zooms-if-still-dropping input.osm.pbf
    pmtiles convert input.mbtiles output.pmtiles

  2. osmium export data.osm.pbf --format geojsonseq > data.geojson
    tippecanoe -zg -o data.mbtiles -f data.geojson
    pmtiles convert data.mbtiles data.pmtiles

Here is the html code.I am using a protomaps basemaps style (the 'light" one) for MapLibre GL JS.
albania.txt
Using the same html code,when I use pmtiles downloaded from protomaps web site,everything works fine.

What am I missing?Is this something I should do when convertin from one file type to another?

Thanks

Fonts for self hosted pmtiles

Hi and thanks a lot for your work on Protomaps. What an exciting project!

I was wondering about the self hosted deployment of .pmtiles you describe here
The steps worked very well. Thanks to the great documentation, I was able to set up world wide vector tiles with CDN in a couple of hours, which is just amazing.

Now I'm able to consume my own vector tiles in Maplibre GL, with the styles provided by 'protomaps-themes-base'. However, following the examples I still see a dependency to the fonts to https://cdn.protomaps.com/fonts/pbf/{fontstack}/{range}.pbf.

I guess if I would want to be completely independent, it would make sense to host those fonts on my own too, right? If so, it would be great to have that step documented too, which I'd be happy to help with.

Also I was wondering why you define the used font as NotoSans-Regular instead of Noto Sans Regular which seems to be the default in the vector tile spec.

Thanks!

pedestrian features in tileset not visualized in style

Sorry to bother again guys, this is just something that might benefit others.

The landuse_pedestrian needs the following added in the layout, currently it only checks for a "footway".
Also needs to be moved below the "water" in the layout so that footbridges would stay afloat.

        [
            "==",
            "highway",
            "pedestrian"
        ],
        [
            "==",
           "pmap:kind",
           "pedestrian"
        ]

landuse_kind intercutting

Tilezen's roads and buildings layers are "intercut" with landuse: the landsuse tag is transferred to buildings and roads on top, to enable styling those features with better contrast.

Screenshot 2023-03-15 at 6 12 30 PM

Though the tilezen spec lists out general design, there are some abstract issues to solve and some implementation details:

  • Do all landuses (dozens of kind values) participate in intercutting? Is there a priority of kinds? What happens if a road passes through an area with multiple overlapping landuses? We can only assign one landuse_kind to each segment.
  • Roads need to be clipped into multiple segments based on the landuses passed through - this is expensive.
  • Do buildings need to be segmented based on intercutting, or should we just use polygon-in-polygon as a coarse test? Same issue with priority/multiple landuses overlapping.
  • If priority exists, doesn't this tie the tile design to the style's rendering order and layers? (If a road is intercut on parks and parking but I choose not to visualize parking polygons in my style, A road that passes through an overlapping section will have landuse_kind=parking instead of landuse_kind=park

Implementation issues:

  • Planetiler has a 1:1 relationship between profile layers and output MVT layers. If landuse polygons participate in tile post-processing, they need to be included in roads and buildings processings (3x), which adds significant compute.

How to get open source styles for Leaflet?

Hi,on this blogpost I can read:
"A global vector tile dataset based on OpenStreetMap data. The organization of layers and tags is described at Basemap Layers, and open source styles are provided for Leaflet as well as MapLibre GL vector rendering."
https://protomaps.com/blog/serverless-maps-now-open-source

So,this repository contains both for Leaflet and Maplibre GL styles,since in the front page is says only styles for MapLibre GL?

Any explanation would be helpful,thanks

TileJSON problems

  • If we are using TileJSON with MapLibre, the style must not reference any layers that are not referenced in the TileJSON.

Road shields for Hawaii show with US interstate artwork

Instead of testing the network value for contains("I "), it should be startsWith("I "), else it catches networks like HI XXXX in error. My bad as a newbie to Java but easy to fix.

For example:

image

https://github.com/protomaps/basemaps/blob/main/tiles/src/main/java/com/protomaps/basemap/layers/Roads.java#L40-L45

if (shieldText.contains("US ")) {
          shieldText = shieldText.replaceAll("US ", "");
          networkVal = "US:US";
        } else if (shieldText.contains("I ")) {
          shieldText = shieldText.replaceAll("I ", "");
          networkVal = "US:I";
        } else {
          // This should be replaced by walking the way's relations (which reliably set network)
          networkVal = "other";
        }

sort_rank and highroad-style layering

In order to make correct casing ordering on complex overpasses, we may need to change Tilezen - Tangram relied on sort_rank with casings to overlay an arbitrary number of layers. For MapLibre GL we have sort_key in the style but that only works per-layer: casings needs to be drawn as separate layers.

In my experience the only solution is to have a fixed set of layers each with their own filter e.g. layers -2, -1, 0, 1, 2. @nvkelso

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.