Compare commits

..

No commits in common. "master" and "1.36.0" have entirely different histories.

4 changed files with 9 additions and 21 deletions

View File

@ -1,8 +1,6 @@
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).
@ -11,21 +9,6 @@ Builds [vector tilesets](https://www.mapbox.com/developers/vector-tiles/) from l
[![Build Status](https://travis-ci.org/mapbox/tippecanoe.svg)](https://travis-ci.org/mapbox/tippecanoe) [![Build Status](https://travis-ci.org/mapbox/tippecanoe.svg)](https://travis-ci.org/mapbox/tippecanoe)
[![Coverage Status](https://codecov.io/gh/mapbox/tippecanoe/branch/master/graph/badge.svg)](https://codecov.io/gh/mapbox/tippecanoe) [![Coverage Status](https://codecov.io/gh/mapbox/tippecanoe/branch/master/graph/badge.svg)](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
------ ------
@ -809,7 +792,7 @@ Example
Imagine you have a tileset of census blocks: Imagine you have a tileset of census blocks:
```sh ```sh
curl -L -O http://www2.census.gov/geo/tiger/TIGER2010/TABBLOCK/2010/tl_2010_06001_tabblock10.zip curl -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
@ -818,7 +801,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 -L -O http://www2.census.gov/census_2010/01-Redistricting_File--PL_94-171/California/ca2010.pl.zip curl -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"

View File

@ -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());

View File

@ -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[8]; char buf[7];
sprintf(buf, "\\u%04lu", utf32[i]); sprintf(buf, "\\u%04lu", utf32[i]);
ret.append(std::string(buf)); ret.append(std::string(buf));
} else { } else {

View File

@ -130,7 +130,10 @@ 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();
@ -506,6 +509,7 @@ 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;
@ -520,6 +524,7 @@ 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);
} }