feat: add native center line style overrides
This commit is contained in:
@@ -7,7 +7,8 @@ from osmassets.geom import clip_polygon, feature_in_bounds, geometry_rings
|
||||
from osmassets.mesh import MeshBatch, add_polyline
|
||||
|
||||
|
||||
def assemble_geojson_layer(path, layer_id, projector, collection, material, z):
|
||||
def assemble_geojson_layer(path, layer_id, projector, collection, material, z,
|
||||
property_filter=None):
|
||||
if not os.path.exists(path):
|
||||
return 0
|
||||
with open(path, "r", encoding="utf-8") as handle:
|
||||
@@ -18,6 +19,8 @@ def assemble_geojson_layer(path, layer_id, projector, collection, material, z):
|
||||
xmax, ymax = projector.xy((b["max_lon"], b["max_lat"]))
|
||||
count = 0
|
||||
for feature in data.get("features", []):
|
||||
if property_filter and not property_filter(feature.get("properties", {})):
|
||||
continue
|
||||
if not feature_in_bounds(feature, projector):
|
||||
continue
|
||||
for ring in geometry_rings(feature.get("geometry")):
|
||||
|
||||
Reference in New Issue
Block a user