forked from mapbox/tippecanoe
-
Notifications
You must be signed in to change notification settings - Fork 0
Feat/cartesian coordinates #2
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
Draft
idoaignostics
wants to merge
7
commits into
master
Choose a base branch
from
feat/cartesian-coordinates
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
351cb7a
chore: init intellij files
idoaignostics daa518e
chore: init claude
idoaignostics cd8efa2
feat: support cartesian coordinates
idoaignostics 88f21e8
fix: enforce mutual exclusivity between --cartesian and --projection/-s
Copilot 99af8d5
fix: improve error messages to include both flag variants
Copilot e6bfd37
chore: remove .idea files
idoaignostics da6879e
fix: validate cartesian extent width/height in decode and tile-join; …
Copilot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Empty file.
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| # CLAUDE.md | ||
|
|
||
| This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. | ||
|
|
||
| ## Build & Test | ||
|
|
||
| ```bash | ||
| make -j # build all binaries | ||
| make test # full test suite (includes geobuf) | ||
| make fewer-tests # faster subset (skips geobuf) | ||
| make indent # clang-format all source | ||
| make clean # remove build artifacts | ||
| make install # install to /usr/local (override with PREFIX=...) | ||
| ``` | ||
|
|
||
| Build flags: `BUILDTYPE=Debug` (default Release), custom `CC`, `CXX`, `CFLAGS`, `CXXFLAGS`, `LDFLAGS`. | ||
|
|
||
| Unit tests run via `./unit` (built from `unit.cpp`, tests `text.cpp`). | ||
|
|
||
| ## What This Is | ||
|
|
||
| C++11 geospatial toolchain that converts GeoJSON/Geobuf/CSV into Mapbox Vector Tile (MVT) tilesets stored as MBTiles (SQLite) or directory trees. Core insight: at low zoom, drop *least-visible* features rather than simplifying geometry—preserving data density and regional texture. | ||
|
|
||
| ## Executables | ||
|
|
||
| | Binary | Entry point | Purpose | | ||
| |--------|-------------|---------| | ||
| | `tippecanoe` | `main.cpp` | Main feature→tileset pipeline | | ||
| | `tippecanoe-decode` | `decode.cpp` | MBTiles/PBF → GeoJSON | | ||
| | `tippecanoe-enumerate` | `enumerate.cpp` | List tiles in an MBTiles | | ||
| | `tile-join` | `tile-join.cpp` | Merge/filter/subset MBTiles | | ||
| | `tippecanoe-json-tool` | `jsontool.cpp` | JSON sorting/CSV integration | | ||
| | `unit` | `unit.cpp` | Unit test runner | | ||
|
|
||
| ## Architecture | ||
|
|
||
| **Processing pipeline** (all in `main.cpp`): | ||
| ``` | ||
| CLI parse → read input (geojson/geobuf/csv) → serialize features to temp files | ||
| → build spatial index → traverse_zooms() → write_tile() per zoom | ||
| → encode MVT/PBF → write MBTiles (mbtiles.cpp) or dirtiles (dirtiles.cpp) | ||
| ``` | ||
|
|
||
| **Key module responsibilities:** | ||
| - `geometry.cpp/hpp` — coordinate transforms, drawing command encoding, simplification | ||
| - `tile.cpp/hpp` — zoom traversal, per-tile feature collection | ||
| - `mvt.cpp/hpp` — Mapbox Vector Tile PBF encoding | ||
| - `mbtiles.cpp/hpp` — SQLite MBTiles I/O | ||
| - `serial.cpp/hpp` — feature serialization between pipeline stages | ||
| - `evaluator.cpp/hpp` — filter expression evaluation | ||
| - `projection.cpp` — Web Mercator and custom projections | ||
| - `jsonpull/` — streaming JSON parser (embedded library) | ||
| - `geojson.cpp`, `geobuf.cpp`, `geocsv.cpp` — input format parsers | ||
|
|
||
| **Limits** (defined in `main.hpp`): `MAX_ZOOM=24`, default tile max 500KB, max 200K features/tile. | ||
|
|
||
| **Parallelism**: `-P` flag enables multi-file parallel processing; uses `CPUS` (detected core count) and temp files for overflow. | ||
|
|
||
| ## Test Structure | ||
|
|
||
| `tests/` holds 40+ fixture directories. Each test compares output tiles/JSON against a `stable/` baseline. To add a test, create a directory with input files and update the relevant test target in `Makefile`. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.