Comments (4)
Probably your settings of maxzoom
and basezoom
are problematic.
Your value 18 is greater than 16, however, Tilemaker assumes a zoomlevel is less than or equals to 16. (Tilemaker assigns 16bits to each of x and y coordinates.)
If you change the value to 15 or so, I expect the first solution gives the correct result.
Could you try it?
Even though, the second solution would not gives the correct result.
This is because multiple identical objects are copied into generatedIndex[newIndex]
, in the following part of tilemaker.cpp
.
// otherwise, we need to run through the z14 list, and assign each way
// to a tile at our zoom level
for (auto it = tileIndex.begin(); it!= tileIndex.end(); ++it) {
uint index = it->first;
uint tilex = (index >> 16 ) / pow(2, baseZoom-zoom);
uint tiley = (index & 65535) / pow(2, baseZoom-zoom);
uint newIndex = (tilex << 16) + tiley;
unordered_set<OutputObject> ooset = it->second;
for (auto jt = ooset.begin(); jt != ooset.end(); ++jt) {
generatedIndex[newIndex].insert(*jt);
}
}
I guess we can fix this by applying sort()
and uniq()
(then we need the =
operator again, and the <
operator is also required).
from tilemaker.
In fact, I already fixed the problem for zoom level > 16 with tilemaker.
For my problem, I found a solution by modifying the == operator of OutputObject like this:
bool operator==(const vector_tile::Tile_Value& x, const vector_tile::Tile_Value& y) {
if(x.has_string_value() && y.has_string_value())
return x.string_value() == y.string_value();
if(x.has_float_value() && y.has_float_value())
return x.float_value() == y.float_value();
if(x.has_double_value() && y.has_double_value())
return x.double_value() == y.double_value();
if(x.has_uint_value() && y.has_uint_value())
return x.uint_value() == y.uint_value();
if(x.has_sint_value() && y.has_sint_value())
return x.sint_value() == y.sint_value();
if(x.has_bool_value() && y.has_bool_value())
return x.bool_value() == y.bool_value();
return false;
}
bool operator!=(const vector_tile::Tile_Value& x, const vector_tile::Tile_Value& y) {
return !(x == y);
}
bool operator==(const OutputObject& x, const OutputObject& y) {
std::map<string, vector_tile::Tile_Value>::iterator it;
if ((x.layer != y.layer) || (x.objectID != y.objectID) || (x.geomType != y.geomType) || (x.attributes.size() != y.attributes.size()))
return false;
for (auto i = x.attributes.begin(); i != x.attributes.end(); ++i) {
if( !y.attributes.count(i->first) || y.attributes.at(i->first) != i->second)
return false ;
}
return true;
}
from tilemaker.
Could you test with the latest version and let me know if this is still an issue?
from tilemaker.
The last version works, thank you
from tilemaker.
Related Issues (20)
- MAC OS issue with types during the make command HOT 10
- Config files aren't installed to a static location HOT 1
- Ubuntu 22.04 tilemaker-server no static folder in share HOT 1
- Attribute(name, value, minzoom) writes attribute on all zoom levels HOT 1
- Lua Runtime Error HOT 2
- Generate tile size statistics HOT 1
- attempt to call global 'Find' (a nil value) HOT 1
- Windows install instructions HOT 2
- Buildings and piers missing at zoom level 13 HOT 3
- Trying to install on Mac HOT 2
- Zoom level simplification HOT 1
- lua error: table is not a function HOT 1
- lua missing, ubuntu 23.04 HOT 1
- STL Vector assertion failed when running maptiles HOT 9
- Assertion failed: (has_wire_type(pbf_wire_type::varint) && "not a varint"), function get_sint64, file pbf_reader.hpp, line 570 HOT 2
- Invalid polygons after clipping at tile boundaries HOT 15
- terminate called after throwing an instance of 'std::out_of_range' HOT 1
- tilemaker-server terminated by signal SIGKILL (Forced quit) HOT 9
- build problems HOT 1
- Planet generation issues on hardware-constrained machine HOT 5
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 tilemaker.