Skip to content

Commit

Permalink
Remove deprecated tags [#282] (#285)
Browse files Browse the repository at this point in the history
* remove deprecated non-kind tags

* tiles 4.0.0-alpha.1
  • Loading branch information
bdon authored Aug 17, 2024
1 parent 3e8af13 commit 0eeafa5
Show file tree
Hide file tree
Showing 10 changed files with 1 addition and 91 deletions.
2 changes: 1 addition & 1 deletion tiles/src/main/java/com/protomaps/basemap/Basemap.java
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public String description() {

@Override
public String version() {
return "4.0.0-alpha.0";
return "4.0.0-alpha.1";
}

@Override
Expand Down
15 changes: 0 additions & 15 deletions tiles/src/main/java/com/protomaps/basemap/layers/Landuse.java
Original file line number Diff line number Diff line change
Expand Up @@ -153,21 +153,6 @@ public void processOsm(SourceFeature sf, FeatureCollector features) {
.setId(FeatureId.create(sf))
// Core Tilezen schema properties
.setAttr("pmap:kind", kind)
// Core OSM tags for different kinds of places
// DEPRECATION WARNING: Marked for deprecation in v4 schema, do not use these for styling
// If an explicate value is needed it should bea kind, or included in kind_detail
.setAttr("aeroway", sf.getString("aeroway"))
.setAttr("amenity", sf.getString("amenity"))
.setAttr("area:aeroway", sf.getString("area:aeroway"))
.setAttr("boundary", sf.getString("boundary"))
.setAttr("highway", sf.getString("highway"))
.setAttr("landuse", sf.getString("landuse"))
.setAttr("leisure", sf.getString("leisure"))
.setAttr("man_made", sf.getString("man_made"))
.setAttr("natural", sf.getString("natural"))
.setAttr("place", sf.getString("place"))
.setAttr("railway", sf.getString("railway"))
.setAttr("sport", sf.getString("sport"))
// NOTE: (nvkelso 20230622) Consider zoom 5 instead...
// But to match Protomaps v2 we do earlier
.setZoomRange(2, 15)
Expand Down
5 changes: 0 additions & 5 deletions tiles/src/main/java/com/protomaps/basemap/layers/Natural.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@ public void processOsm(SourceFeature sf, FeatureCollector features) {
//.setId(FeatureId.create(sf))
// Core Tilezen schema properties
.setAttr("pmap:kind", kind)
// Core OSM tags for different kinds of places
// DEPRECATION WARNING: Marked for deprecation in v4 schema, do not use these for styling
// If an explicate value is needed it should bea kind, or included in kind_detail
.setAttr("natural", sf.getString("natural"))
.setAttr("landuse", sf.getString("landuse"))
// NOTE: (nvkelso 20230622) Consider zoom 5 instead...
// But to match Protomaps v2 we do earlier
.setZoomRange(2, 15)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@ public void processOsm(SourceFeature sf, FeatureCollector features) {
.setAttr("pmap:kind", kind)
// Used for client-side label collisions
.setAttr("pmap:min_zoom", minZoom + 1)
// Core OSM tags for different kinds of places
// DEPRECATION WARNING: Marked for deprecation in v4 schema, do not use these for styling
// If an explicate value is needed it should bea kind, or included in kind_detail
.setAttr("waterway", sf.getString("waterway"))
.setAttr("natural", sf.getString("natural"))
// Add less common core Tilezen attributes only at higher zooms (will continue to v4)
//.setAttrWithMinzoom("bridge", sf.getString("bridge"), 12)
//.setAttrWithMinzoom("tunnel", sf.getString("tunnel"), 12)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,15 +187,6 @@ public void processOsm(SourceFeature sf, FeatureCollector features) {
// predictable client-side label collisions
// 512 px zooms versus 256 px logical zooms
.setAttr("pmap:min_zoom", nameMinZoom + 1)

// Core OSM tags for different kinds of places
// DEPRECATION WARNING: Marked for deprecation in v4 schema, do not use these for styling
// If an explicate value is needed it should bea kind, or included in kind_detail
.setAttr("natural", sf.getString("natural"))
.setAttr("landuse", sf.getString("landuse"))
.setAttr("leisure", sf.getString("leisure"))
.setAttr("water", sf.getString("water"))
.setAttr("waterway", sf.getString("waterway"))
// Add less common core Tilezen attributes only at higher zooms (will continue to v4)
.setAttrWithMinzoom("bridge", sf.getString("bridge"), 12)
.setAttrWithMinzoom("tunnel", sf.getString("tunnel"), 12)
Expand Down
3 changes: 0 additions & 3 deletions tiles/src/main/java/com/protomaps/basemap/layers/Places.java
Original file line number Diff line number Diff line change
Expand Up @@ -378,9 +378,6 @@ public void processOsm(SourceFeature sf, FeatureCollector features) {
.setAttr("capital", sf.getString("capital"))
.setAttr("population", population)
.setAttr("pmap:population_rank", populationRank)
// DEPRECATION WARNING: Marked for deprecation in v4 schema, do not use these for styling
// If an explicate value is needed it should be a kind, or included in kind_detail
.setAttr("place", sf.getString("place"))
// Generally we use NE and low zooms, and OSM at high zooms
// With exceptions for country and region labels
.setZoomRange(Math.max((int) minZoom, themeMinZoom), (int) maxZoom);
Expand Down
36 changes: 0 additions & 36 deletions tiles/src/main/java/com/protomaps/basemap/layers/Pois.java
Original file line number Diff line number Diff line change
Expand Up @@ -452,25 +452,8 @@ public void processOsm(SourceFeature sf, FeatureCollector features) {
// Core OSM tags for different kinds of places
// Special airport only tag (to indicate if it's an airport with regular commercial flights)
.setAttr("iata", sf.getString("iata"))
// DEPRECATION WARNING: Marked for deprecation in v4 schema, do not use these for styling
// If an explicate value is needed it should be a kind, or included in kind_detail
.setAttr("amenity", sf.getString("amenity"))
.setAttr("attraction", sf.getString("attraction"))
.setAttr("craft", sf.getString("craft"))
.setAttr("historic", sf.getString("historic"))
.setAttr("landuse", sf.getString("landuse"))
.setAttr("leisure", sf.getString("leisure"))
.setAttr("natural", sf.getString("natural"))
.setAttr("railway", sf.getString("railway"))
.setAttr("shop", sf.getString("shop"))
.setAttr("tourism", sf.getString("tourism"))
// Extra OSM tags for certain kinds of places
// These are duplicate of what's in the kind_detail tag
// DEPRECATION WARNING: Marked for deprecation in v4 schema, do not use these for styling
// If an explicate value is needed it should be a kind, or included in kind_detail
.setAttr("cuisine", sf.getString("cuisine"))
.setAttr("religion", sf.getString("religion"))
.setAttr("sport", sf.getString("sport"))
.setZoomRange(Math.min(15, minZoom), 15)
.setBufferPixels(128);

Expand Down Expand Up @@ -506,25 +489,6 @@ public void processOsm(SourceFeature sf, FeatureCollector features) {
// Core OSM tags for different kinds of places
// Special airport only tag (to indicate if it's an airport with regular commercial flights)
.setAttr("iata", sf.getString("iata"))
// DEPRECATION WARNING: Marked for deprecation in v4 schema, do not use these for styling
// If an explicate value is needed it should bea kind, or included in kind_detail
.setAttr("amenity", sf.getString("amenity"))
.setAttr("attraction", sf.getString("attraction"))
.setAttr("craft", sf.getString("craft"))
.setAttr("historic", sf.getString("historic"))
.setAttr("landuse", sf.getString("landuse"))
.setAttr("leisure", sf.getString("leisure"))
.setAttr("natural", sf.getString("natural"))
.setAttr("railway", sf.getString("railway"))
.setAttr("shop", sf.getString("shop"))
.setAttr("tourism", sf.getString("tourism"))
// Extra OSM tags for certain kinds of places
// These are duplicate of what's in the kind_detail tag
// DEPRECATION WARNING: Marked for deprecation in v4 schema, do not use these for styling
// If an explicate value is needed it should bea kind, or included in kind_detail
.setAttr("cuisine", sf.getString("cuisine"))
.setAttr("religion", sf.getString("religion"))
.setAttr("sport", sf.getString("sport"))
.setZoomRange(Math.min(minZoom, 15), 15)
.setBufferPixels(128);

Expand Down
3 changes: 0 additions & 3 deletions tiles/src/main/java/com/protomaps/basemap/layers/Roads.java
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,6 @@ public void processOsm(SourceFeature sf, FeatureCollector features) {
// Core OSM tags for different kinds of places
.setAttrWithMinzoom("layer", Parse.parseIntOrNull(sf.getString("layer")), 12)
.setAttrWithMinzoom("oneway", sf.getString("oneway"), 14)
// DEPRECATION WARNING: Marked for deprecation in v4 schema, do not use these for styling
// If an explicate value is needed it should bea kind, or included in kind_detail
.setAttr("highway", highway)
.setMinPixelSize(0)
.setPixelTolerance(0)
.setZoomRange(minZoom, maxZoom);
Expand Down
7 changes: 0 additions & 7 deletions tiles/src/main/java/com/protomaps/basemap/layers/Transit.java
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,6 @@ public void processOsm(SourceFeature sf, FeatureCollector features) {
.setAttr("ref", sf.getString("ref"))
.setAttr("route", sf.getString("route"))
.setAttr("service", sf.getString("service"))
// DEPRECATION WARNING: Marked for deprecation in v4 schema, do not use these for styling
// If an explicate value is needed it should bea kind, or included in kind_detail
.setAttr("aerialway", sf.getString("aerialway"))
.setAttr("aeroway", sf.getString("aeroway"))
.setAttr("highspeed", sf.getString("highspeed"))
.setAttr("man_made", sf.getString("pier"))
.setAttr("railway", sf.getString("railway"))
.setZoomRange(minZoom, 15);

// Core Tilezen schema properties
Expand Down
7 changes: 0 additions & 7 deletions tiles/src/main/java/com/protomaps/basemap/layers/Water.java
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,6 @@ public void processOsm(SourceFeature sf, FeatureCollector features) {
.setAttrWithMinzoom("bridge", sf.getString("bridge"), 12)
.setAttrWithMinzoom("tunnel", sf.getString("tunnel"), 12)
.setAttrWithMinzoom("layer", Parse.parseIntOrNull(sf.getString("layer")), 12)
// DEPRECATION WARNING: Marked for deprecation in v4 schema, do not use these for styling
// If an explicate value is needed it should bea kind, or included in kind_detail
.setAttr("natural", sf.getString("natural"))
.setAttr("landuse", sf.getString("landuse"))
.setAttr("leisure", sf.getString("leisure"))
.setAttr("water", sf.getString("water"))
.setAttr("waterway", sf.getString("waterway"))
.setZoomRange(6, 15)
.setMinPixelSize(1.0)
.setBufferPixels(8);
Expand Down

0 comments on commit 0eeafa5

Please sign in to comment.