mirror of
https://github.com/cfpwastaken/planetiler-openmaptiles.git
synced 2026-02-04 12:31:10 +00:00
Set feature IDs in boundary and agg_stop features. (#148)
This commit is contained in:
@@ -269,6 +269,7 @@ public class Boundary implements
|
||||
// save for later
|
||||
try {
|
||||
CountryBoundaryComponent component = new CountryBoundaryComponent(
|
||||
feature.id(),
|
||||
minAdminLevel,
|
||||
disputed,
|
||||
maritime,
|
||||
@@ -323,7 +324,7 @@ public class Boundary implements
|
||||
if (merged instanceof LineString lineString) {
|
||||
BorderingRegions borderingRegions = getBorderingRegions(countryBoundaries, key.regions, lineString);
|
||||
|
||||
var features = featureCollectors.get(SimpleFeature.fromWorldGeometry(lineString));
|
||||
var features = featureCollectors.get(SimpleFeature.fromWorldGeometry(lineString, key.id));
|
||||
var newFeature = features.line(LAYER_NAME).setBufferPixels(BUFFER_SIZE)
|
||||
.setAttr(Fields.ADMIN_LEVEL, key.adminLevel)
|
||||
.setAttr(Fields.DISPUTED, key.disputed ? 1 : 0)
|
||||
@@ -471,6 +472,7 @@ public class Boundary implements
|
||||
* Information to hold onto from processing a way in a boundary relation to determine the left/right region ID later.
|
||||
*/
|
||||
private record CountryBoundaryComponent(
|
||||
long id,
|
||||
int adminLevel,
|
||||
boolean disputed,
|
||||
boolean maritime,
|
||||
@@ -482,7 +484,7 @@ public class Boundary implements
|
||||
) {
|
||||
|
||||
CountryBoundaryComponent groupingKey() {
|
||||
return new CountryBoundaryComponent(adminLevel, disputed, maritime, minzoom, null, regions, claimedBy, name);
|
||||
return new CountryBoundaryComponent(id, adminLevel, disputed, maritime, minzoom, null, regions, claimedBy, name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user