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

Dynamic zoom -zg not being able to generate tiles for a small data feature #287

Open
MariaSliacka opened this issue Oct 23, 2024 · 0 comments

Comments

@MariaSliacka
Copy link

Hello, we noticed that when using the -zg option, we are unable to generate tiles for a very small data, such as the geojson below that contains just one line. But using -z15 on that same data produces tiles as expected. See the command and the output below the geojson. Is there any workaround or a fix that we could use to make the tiler works with the -zg option?

{
    "type": "FeatureCollection",
    "features": [
        {
            "id": 202,
            "type": "Feature",
            "geometry": {
                "type": "GeometryCollection",
                "geometries": [
                    {
                        "type": "MultiLineString",
                        "coordinates": [
                            [
                                [
                                    -2.46099426,
                                    56.70343111
                                ],
                                [
                                    -2.46084165,
                                    56.70159985
                                ]
                            ]
                        ]
                    }
                ]
            },
            "properties": {
                "layer_name": "ESCA_CABLE"
            }
        }
    ],
    "crs": {
        "type": "name",
        "properties": {
            "name": "EPSG:4326"
        }
    }
}

When using -zg, the chosen max zoom is 1 but it actually only generates the metadata file:

% tippecanoe --drop-smallest-as-needed --no-tile-compression -S10 --simplify-only-low-zooms -zg --layer=geojson -e tests/small_layer small_layer.geojson
error_layer.geojson: Warning: GeoJSON specified projection "EPSG:4326", not the expected "urn:ogc:def:crs:OGC:1.3:CRS84".
error_layer.geojson: If "urn:ogc:def:crs:OGC:1.3:CRS84" is not the expected projection, use -s to specify the right one.
1 features, 48 bytes of geometry and attributes, 24 bytes of string pool, 0 bytes of vertices, 0 bytes of nodes
Choosing a maxzoom of -z1 for resolution of about 146766 feet (44734 meters) within features
  95.8%  1/0/0

But when using for example -z15 it generates all the tiles as expected:

% tippecanoe --drop-smallest-as-needed --no-tile-compression -S10 --simplify-only-low-zooms -z15 --layer=geojson -e tests/small_layer small_layer.geojson
error_layer.geojson: Warning: GeoJSON specified projection "EPSG:4326", not the expected "urn:ogc:def:crs:OGC:1.3:CRS84".
error_layer.geojson: If "urn:ogc:def:crs:OGC:1.3:CRS84" is not the expected projection, use -s to specify the right one.
1 features, 46 bytes of geometry and attributes, 24 bytes of string pool, 0 bytes of vertices, 0 bytes of nodes
  96.2%  15/16159/10088
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant