mirror of
https://github.com/mapbox/tippecanoe.git
synced 2025-04-24 04:55:55 +00:00
Compare commits
11 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
2daf84a6c1 | ||
|
5d45f89d7e | ||
|
18e53cd7fb | ||
|
158b5fb292 | ||
|
4bb73aa6bc | ||
|
5808c95111 | ||
|
1fa797bc17 | ||
|
62554b6cd9 | ||
|
9ece7c0d36 | ||
|
6d2713b02a | ||
|
efa40d20ab |
21
README.md
21
README.md
@ -1,6 +1,8 @@
|
|||||||
tippecanoe
|
tippecanoe
|
||||||
==========
|
==========
|
||||||
|
|
||||||
|
**Note**: there is an active fork of this project over at https://github.com/felt/tippecanoe
|
||||||
|
|
||||||
Builds [vector tilesets](https://www.mapbox.com/developers/vector-tiles/) from large (or small) collections of [GeoJSON](http://geojson.org/), [Geobuf](https://github.com/mapbox/geobuf), or [CSV](https://en.wikipedia.org/wiki/Comma-separated_values) features,
|
Builds [vector tilesets](https://www.mapbox.com/developers/vector-tiles/) from large (or small) collections of [GeoJSON](http://geojson.org/), [Geobuf](https://github.com/mapbox/geobuf), or [CSV](https://en.wikipedia.org/wiki/Comma-separated_values) features,
|
||||||
[like these](MADE_WITH.md).
|
[like these](MADE_WITH.md).
|
||||||
|
|
||||||
@ -9,6 +11,21 @@ Builds [vector tilesets](https://www.mapbox.com/developers/vector-tiles/) from l
|
|||||||
[](https://travis-ci.org/mapbox/tippecanoe)
|
[](https://travis-ci.org/mapbox/tippecanoe)
|
||||||
[](https://codecov.io/gh/mapbox/tippecanoe)
|
[](https://codecov.io/gh/mapbox/tippecanoe)
|
||||||
|
|
||||||
|
### :zap: Mapbox has a new service for creating vector tilesets! :zap:
|
||||||
|
|
||||||
|
[Mapbox Tiling Service (MTS)](https://docs.mapbox.com/mapbox-tiling-service/overview/) is a hosted, data processing service that allows you to integrate custom datasets of any scale into your maps faster, cheaper, and with more flexibility and control than previously possible.
|
||||||
|
|
||||||
|
MTS is the same service we use internally to create our global, daily updating basemap product Mapbox Streets, which serves over 650 million monthly active users and customers such as Facebook, Snap, the Weather Channel, Tableau, and Shopify.
|
||||||
|
|
||||||
|
MTS creates and updates data using distributed and parallelized processing, meaning data is processed much more quickly than is possible with a standard, single server setup with comparable tools. For example, a global basemap at 30cm precision (max zoom of 16) can be processed in under 2 hours with MTS, whereas a comparable workload would take multiple days to process on a single server.
|
||||||
|
|
||||||
|
Customers like AllTrails, Plume Labs, and Ookla have noted that MTS helps them:
|
||||||
|
- build applications faster by focusing more on app development, not infrastructure
|
||||||
|
- build more compelling user experiences that drive better user engagement
|
||||||
|
- get updated data to their users faster—in some cases up to 90% faster than previous tools
|
||||||
|
|
||||||
|
Learn more about [MTS](https://blog.mapbox.com/introducing-mapbox-tiling-service-df1df636c7cf).
|
||||||
|
|
||||||
Intent
|
Intent
|
||||||
------
|
------
|
||||||
|
|
||||||
@ -792,7 +809,7 @@ Example
|
|||||||
Imagine you have a tileset of census blocks:
|
Imagine you have a tileset of census blocks:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
curl -O http://www2.census.gov/geo/tiger/TIGER2010/TABBLOCK/2010/tl_2010_06001_tabblock10.zip
|
curl -L -O http://www2.census.gov/geo/tiger/TIGER2010/TABBLOCK/2010/tl_2010_06001_tabblock10.zip
|
||||||
unzip tl_2010_06001_tabblock10.zip
|
unzip tl_2010_06001_tabblock10.zip
|
||||||
ogr2ogr -f GeoJSON tl_2010_06001_tabblock10.json tl_2010_06001_tabblock10.shp
|
ogr2ogr -f GeoJSON tl_2010_06001_tabblock10.json tl_2010_06001_tabblock10.shp
|
||||||
./tippecanoe -o tl_2010_06001_tabblock10.mbtiles tl_2010_06001_tabblock10.json
|
./tippecanoe -o tl_2010_06001_tabblock10.mbtiles tl_2010_06001_tabblock10.json
|
||||||
@ -801,7 +818,7 @@ ogr2ogr -f GeoJSON tl_2010_06001_tabblock10.json tl_2010_06001_tabblock10.shp
|
|||||||
and a CSV of their populations:
|
and a CSV of their populations:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
curl -O http://www2.census.gov/census_2010/01-Redistricting_File--PL_94-171/California/ca2010.pl.zip
|
curl -L -O http://www2.census.gov/census_2010/01-Redistricting_File--PL_94-171/California/ca2010.pl.zip
|
||||||
unzip -p ca2010.pl.zip cageo2010.pl |
|
unzip -p ca2010.pl.zip cageo2010.pl |
|
||||||
awk 'BEGIN {
|
awk 'BEGIN {
|
||||||
print "GEOID10,population"
|
print "GEOID10,population"
|
||||||
|
@ -270,7 +270,7 @@ drawvec clean_or_clip_poly(drawvec &geom, int z, int buffer, bool clip) {
|
|||||||
mapbox::geometry::multi_polygon<long long> result;
|
mapbox::geometry::multi_polygon<long long> result;
|
||||||
try {
|
try {
|
||||||
wagyu.execute(mapbox::geometry::wagyu::clip_type_union, result, mapbox::geometry::wagyu::fill_type_positive, mapbox::geometry::wagyu::fill_type_positive);
|
wagyu.execute(mapbox::geometry::wagyu::clip_type_union, result, mapbox::geometry::wagyu::fill_type_positive, mapbox::geometry::wagyu::fill_type_positive);
|
||||||
} catch (std::runtime_error e) {
|
} catch (std::runtime_error &e) {
|
||||||
FILE *f = fopen("/tmp/wagyu.log", "w");
|
FILE *f = fopen("/tmp/wagyu.log", "w");
|
||||||
fprintf(f, "%s\n", e.what());
|
fprintf(f, "%s\n", e.what());
|
||||||
fprintf(stderr, "%s\n", e.what());
|
fprintf(stderr, "%s\n", e.what());
|
||||||
|
@ -111,7 +111,7 @@ std::string sort_quote(const char *s) {
|
|||||||
|
|
||||||
for (size_t i = 0; i < utf32.size(); i++) {
|
for (size_t i = 0; i < utf32.size(); i++) {
|
||||||
if (utf32[i] < 0xD800) {
|
if (utf32[i] < 0xD800) {
|
||||||
char buf[7];
|
char buf[8];
|
||||||
sprintf(buf, "\\u%04lu", utf32[i]);
|
sprintf(buf, "\\u%04lu", utf32[i]);
|
||||||
ret.append(std::string(buf));
|
ret.append(std::string(buf));
|
||||||
} else {
|
} else {
|
||||||
|
@ -130,10 +130,7 @@ void tilestats(std::map<std::string, layermap_entry> const &layermap1, size_t el
|
|||||||
state.json_write_string("layers");
|
state.json_write_string("layers");
|
||||||
state.json_write_array();
|
state.json_write_array();
|
||||||
|
|
||||||
bool first = true;
|
|
||||||
for (auto layer : layermap) {
|
for (auto layer : layermap) {
|
||||||
first = false;
|
|
||||||
|
|
||||||
state.nospace = true;
|
state.nospace = true;
|
||||||
state.json_write_hash();
|
state.json_write_hash();
|
||||||
|
|
||||||
@ -509,7 +506,6 @@ void mbtiles_write_metadata(sqlite3 *outdb, const char *outdir, const char *fnam
|
|||||||
state.json_write_newline();
|
state.json_write_newline();
|
||||||
|
|
||||||
sqlite3_stmt *stmt;
|
sqlite3_stmt *stmt;
|
||||||
bool first = true;
|
|
||||||
if (sqlite3_prepare_v2(db, "SELECT name, value from metadata;", -1, &stmt, NULL) == SQLITE_OK) {
|
if (sqlite3_prepare_v2(db, "SELECT name, value from metadata;", -1, &stmt, NULL) == SQLITE_OK) {
|
||||||
while (sqlite3_step(stmt) == SQLITE_ROW) {
|
while (sqlite3_step(stmt) == SQLITE_ROW) {
|
||||||
std::string key, value;
|
std::string key, value;
|
||||||
@ -524,7 +520,6 @@ void mbtiles_write_metadata(sqlite3 *outdb, const char *outdir, const char *fnam
|
|||||||
state.json_comma_newline();
|
state.json_comma_newline();
|
||||||
state.json_write_string(k);
|
state.json_write_string(k);
|
||||||
state.json_write_string(v);
|
state.json_write_string(v);
|
||||||
first = false;
|
|
||||||
}
|
}
|
||||||
sqlite3_finalize(stmt);
|
sqlite3_finalize(stmt);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user