Comments (4)
doesn't produce any effect
@tyrasd do you mean that there is no 0/0/0
tile generated here? I just tested with this geojson (I know, very unrealistic) and it tiles at 0/0/0
when minzoom is set to 0
.
Something to keep in mind is that mapbox-tile-copy uses Mapnik when tiling - Mapnik makes some decisions about simplification that can lead to no geometry at z0, even if you specify a tile to exist at z0. The mapbox-tile-copy
options for min/maxzoom
only say that the library should attempt to generate a tile here, if it results in an empty tile we throw it away.
from mapbox-tile-copy.
Our use case is here: https://github.com/hotosm/osm-analytics-cruncher/blob/f2b71fc9c70e2279707e20f630a0402ce4aa2107/hotprojects.sh#L4, where we're uploading a large-ish geojson file (with high level of detail as well as global coverage) as vector tiles to s3. Using minzoom=1 everything works fine, but with minzoom=0 results only get calculated up to zoom level 6 (if I remember correctly).
I'm pretty sure conditions like https://github.com/mapbox/mapbox-tile-copy/blob/master/bin/mapbox-tile-copy.js#L42 and https://github.com/mapbox/mapbox-tile-copy/blob/master/lib/tilelivecopy.js#L52 are causing issues when the supplied value is a literal numeric 0
.
from mapbox-tile-copy.
Ah, you're right! I tested with a case that also set info.minzoom
to 0
so it didn't occur to me that options.minzoom
was skipped. The following js snippets prove you are correct:
bangbang
var minzoom = 0;
var maxzoom = 15;
[minzoom, maxzoom].forEach(function(zoom) {
if (!!zoom) {
console.log('zoom is set to ' + zoom);
} else {
console.log('zoom does not exist');
}
});
// => zoom does not exist
// => zoom is set to 15
check for defined value
var options = {
minzoom: 0,
maxzoom: 15
};
var minzoom = options.minzoom || 'there is no minzoom set';
var maxzoom = options.maxzoom || 'there is no maxzoom set';
console.log(minzoom); // => there is no minzoom set
console.log(maxzoom); // => 15
I think if we check for a numeric value here, i.e minzoom >= 0
we should start fixing things. I'll start working on a fix here, thanks for the report @tyrasd!
from mapbox-tile-copy.
Hi @tyrasd I'm trying to find a more streamlined workflow for setting min/maxzoom instead of using tippecanoe and ran into this issue. Did you ever find a solution?
from mapbox-tile-copy.
Related Issues (20)
- support server side encryption (sse) instead of hardcoding aes256 HOT 3
- Depending on cutting-room-floor module HOT 8
- Add Error Handler for "x is out of range" HOT 1
- Add tracker for invalid/valid vector tiles HOT 1
- npm install can't get precompiled binaries HOT 4
- Validate parts
- Add error handling for supporting deflate coded vector tiles HOT 1
- question on "updating" tiles HOT 1
- serving Tiles on S3?
- npm errors HOT 1
- upgrade mbtiles to 0.10.0
- Implement S3 Cleanup Routine
- "Tile does not exist" error HOT 2
- Fails on buckets containing dots HOT 4
- "Connection timed out after 2000ms" HOT 2
- Update mapnik dependency HOT 2
- generating raster tiles from vector tiles
- undefined symbol: napi_add_finalizer HOT 1
- Reduce your request rate
- Mapnik arm64 binary not accessible on arm64 darwin
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mapbox-tile-copy.