mapbox / mapbox/tippecanoe

tippecanoe-decode produces invalid geojson file

Open
#652 8 comments 1 reaction 0 assignees View on GitHub
Dominant language
C++
Stars
3.1k
Forks
430
PR merge metrics
No merged PRs in 30d

Description

When I use tippecanoe-decode to convert mbtiles file to geojson file, like:

tippecanoe-decode cumberfldparallll.mbtiles 12 1151 1621 > tile.geojson

I get a geojson file that produces the following error message, when using http://geojsonlint.com/

Line 1: FeatureCollection object cannot contain a "properties" member
Line 2: Feature object cannot contain a "features" member
Line 2: GeoJSON features must have a type=feature member
Line 2: "geometry" member required

I've not been able to read the geojson file using OpenLayers, because of the "properties" member in the FeatureCollection object. If I remove themL

"properties": { "zoom": 12, "x": 1151, "y": 1621 }, "features": [
{ "type": "FeatureCollection", "properties": { "layer": "cumberfldparallll", "version": 2, "extent": 4096 },

I no longer get those error message in geojsonlint, and am able to read the file using OpenLayers. Is there a way of producing a mbtiles or geojson file with tippecanoe that does not have that information? I this an alternative standard for geojson?

Thanks
Jim

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the reported command with tippecanoe-decode on the referenced MBTiles tile and inspect the generated tile.geojson against the GeoJSON specification. Check how the decoder represents tile metadata and features, then verify the result with geojsonlint.com and OpenLayers. Done means the output is valid GeoJSON without requiring manual removal of members.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
data
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.