mapbox / mapbox/tippecanoe

Tippecanoe Overwriting Unique Property Values Across Features

Open
#998 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
3.1k
Forks
430
PR merge metrics
No merged PRs in 30d

Description

I am encountering an issue with Tippecanoe while generating vector tiles from GeoJSON data. Specifically, the `uprn` property of the second feature is being replaced with the `uprn` of the first feature. This occurs when generating tiles with the following command:

**Command:**
```bash
tippecanoe --no-feature-limit --buffer=64 --no-tile-size-limit --force --force-feature-limit --no-tile-size-limit --include=uprn --attribute-type=uprn:string --minimum-zoom=5 --maximum-zoom=16 --drop-rate=0.5 --layer=layername --output-to-directory "tiles" .simple-zero.geojson
```

**GeoJSON Sample:**
```json
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [0.2695046458, 51.1373675861]
},
"properties": {
"uprn": "100062108583",
"parking_spaces": 0,
"address": "FLAT 3, 139, CAMDEN ROAD, TUNBRIDGE WELLS, TN1 2RA",
"property_class": "RD06",
"parkable_area": 48.709404,
"postcode": "TN1 2RA"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [0.4840589415, 51.2704560878]
},
"properties": {
"uprn": "10022901830",
"parking_spaces": 0,
"address": "FLAT 8, KINGSWOOD HOUSE, MARIGOLD WAY, MAIDSTONE, ME16 0GA",
"property_class": "RD06",
"parkable_area": 76.709114,
"postcode": "ME16 0GA"
}
}
]
}
```

**Issue:**

When generating tiles, the second feature’s `uprn` (`10022901830`) gets replaced by the first feature's `uprn` (`100062108583`). The other properties are retained correctly, but this issue is causing a duplication of the `uprn` value across both features.

**Expected Result:**

The `uprn` of each feature should remain unique and retain its original value from the GeoJSON input.

**Steps Taken:**
- I ensured the `uprn` property is included and set as a string using `--include=uprn` and `--attribute-type=uprn:string`.
- I used the `--no-feature-limit` and `--no-tile-size-limit` options to avoid any potential feature limitations.
- Tested with different zoom levels and tile generation configurations, but the issue persists.

Could you please provide guidance on how to fix this issue or whether there might be a bug affecting the handling of unique properties across features?

Thank you for your assistance!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with the provided GeoJSON sample and Tippecanoe command, then inspect the generated tiles in the `tiles` directory to compare both features' `uprn` values. Done means each feature retains its original unique `uprn` value while the other properties remain intact.

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
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.