Compare commits

..

11 Commits

Author SHA1 Message Date
Arun Ganesh
2daf84a6c1
Merge pull request #980 from curran/patch-1
Point to active fork.
2024-03-01 22:21:25 +05:30
Curran Kelleher
5d45f89d7e
Closes #979 2023-08-30 13:53:12 -04:00
Eric Fischer
18e53cd7fb
Merge pull request #862 from jalessio/patch-1
Instruct curl to follow redirects for census.gov URLs
2021-02-12 08:30:54 -08:00
Eric Fischer
158b5fb292
Merge pull request #861 from emonty/clean-warnings
Clean a few warnings emited by GCC v8
2021-02-12 08:30:17 -08:00
brsbl
4bb73aa6bc
Update README.md 2020-10-01 12:59:06 -07:00
brsbl
5808c95111
Merge pull request #883 from mapbox/readme-update
Update README.md
2020-10-01 12:56:21 -07:00
Blake Thompson
1fa797bc17 One more readme change 2020-10-01 14:54:02 -05:00
Blake Thompson
62554b6cd9 Pull title to the top 2020-10-01 14:53:02 -05:00
brsbl
9ece7c0d36
Update README.md
Small update to the README.md 

cc @flippmoke
2020-10-01 12:50:19 -07:00
Jamie Alessio
6d2713b02a
Instruct curl to follow redirects for census.gov URLs
These examples are no longer working without the addition of `-L` to the `curl` command. Note that other examples in this same file already have the `-L` for `census.gov` URLs.

Example for URL being called:
```
> curl -I http://www2.census.gov/census_2010/01-Redistricting_File--PL_94-171/California/ca2010.pl.zip

HTTP/1.1 302 Moved Temporarily
Location: https://www2.census.gov/census_2010/01-Redistricting_File--PL_94-171/California/ca2010.pl.zip?sec_ak_reference=18.440ad717.1589950562.829e1048
Server: BigIP
Content-Length: 0
Date: Wed, 20 May 2020 04:56:02 GMT
Connection: keep-alive
```
2020-05-19 21:57:28 -07:00
Monty Taylor
efa40d20ab Clean a few warnings emited by GCC v8
An instance of catching an exception by value:

  https://blog.knatten.org/2010/04/02/always-catch-exceptions-by-reference/

In jsontool, there's a warning about writing 8 bytes into a 7
byte buffer, potentially truncating or losing the nul-terminator.

There are a couple of instances of an unused bool variable, not
really a big deal.
2020-05-17 09:43:24 -05:00
4 changed files with 21 additions and 9 deletions

View File

@ -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
[![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
------ ------
@ -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"

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[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 {

View File

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