Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenMapTiles 3.15.0 SNAPSHOT #126

Merged
merged 146 commits into from
Dec 22, 2023

Conversation

phanecak-maptiler
Copy link
Collaborator

@phanecak-maptiler phanecak-maptiler commented Nov 2, 2023

This PR brings into planetiler-openmaptiles all the changes from OpenMapTiles ( https://github.com/openmaptiles/openmaptiles ) since 3.14.0, e.g. after it is merged, planetiler-openmaptiles/main should be equivalent to (current) openmaptiles/master. In other words, this implements OpenMapTiles 3.15.0 "snapshot".

Depending on how it goes with OpenMapTiles, the plan would be to release planetiler-openmaptiles 3.15.0 shortly after release of OpenMapTiles 3.15.0.

This PR is the result of several incremental updates, usually trying to implement one OpenMapTiles PR in "1 to 1" fashion as one planetiler-openmaptiles PR:

phanecak-maptiler and others added 30 commits July 5, 2023 13:37
Show the Trans-Canada Highway at z4, refactor national network list
src/main/java/org/openmaptiles/layers/Housenumber.java Outdated Show resolved Hide resolved
src/main/java/org/openmaptiles/layers/Housenumber.java Outdated Show resolved Hide resolved
src/main/java/org/openmaptiles/layers/Poi.java Outdated Show resolved Hide resolved
src/main/java/org/openmaptiles/layers/Poi.java Outdated Show resolved Hide resolved
src/main/java/org/openmaptiles/layers/Poi.java Outdated Show resolved Hide resolved
src/main/java/org/openmaptiles/layers/Transportation.java Outdated Show resolved Hide resolved
Comment on lines 625 to 636
.setMinZoom(getFerryMinzoom(element));
}

int getFerryMinzoom(Tables.OsmShipwayLinestring element) {
try {
return Utils.getClippedMinZoomForLength(element.source().length(), 3, 4, 11);
} catch (GeometryException e) {
e.log(stats, "omt_ferry_minzoom",
"Unable to calculate ferry minzoom for " + element.source().id());
// ferries are supposed to be included in Z4-Z10 depending on their length (=this min. zoom calculation), for Z11+ always, hence 11 as fallback
return 11;
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you try this out?

  @Override
  public void process(Tables.OsmShipwayLinestring element, FeatureCollector features) {
    features.line(LAYER_NAME).setBufferPixels(BUFFER_SIZE)
      .setAttr(Fields.CLASS, element.shipway()) // "ferry"
      // no subclass
      .setAttr(Fields.SERVICE, service(element.service()))
      .setAttr(Fields.RAMP, element.isRamp() ? 1L : null)
      .setAttr(Fields.BRUNNEL, brunnel(element.isBridge(), element.isTunnel(), element.isFord()))
      .setAttr(Fields.LAYER, nullIfLong(element.layer(), 0))
      .setSortKey(element.zOrder())
      .setMinPixelSize(0) // merge during post-processing, then limit by size
      .setMinZoom(4)
      .setMinPixelSizeBelowZoom(10, 32);
  }

that should be doing exactly the same thing as the getFerryMinzoom function. When I try that out I see:

Your branch: image with that change: image

@msbarry
Copy link
Collaborator

msbarry commented Dec 21, 2023

Once that test is fixed, looks good to merge from my end. Thanks for the hard work on this!

@phanecak-maptiler phanecak-maptiler merged commit add205e into openmaptiles:main Dec 22, 2023
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement agg_stop tag in the poi layer
2 participants