-
Notifications
You must be signed in to change notification settings - Fork 103
Better workflow for very large national line dataset #339
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks! I'll take a look and see if I can figure out how to make this work well. I am also running into the infinite loop trying to thin out the features in my first attempt. |
Much appreciated @e-n-f!! |
I think #340 should fix the infinite loop problem, at least, but I am still struggling to get a decent tileset for this data that doesn't have dropouts at any zoom level.
makes it to z8 but then fails to get tile 8/252/156 under a million bytes. |
A detail of 9 means that each tile's coordinates are in the range 0 through 2^9, which is 512. The overall precision of a tileset is 360 / (2 ^ (detail + maxzoom)) degrees. If I have the conversion right that 1 cm at the equator is 0.000000089895 degrees, that means that detail 12 at z18 is 3.73 cm (360 / (2 ^ (12 + 18)) / 0.000000089895). If your renderer can support it, you could increase the detail at maxzoom instead of the zoom level. Mapbox GL can't make use of detail higher than 13 (8192x8192 tiles). Thanks for pointing out the missing features. I'll take a look and see if I can figure out what has happened to them. I wish I knew how to keep the overall tile size under 1 MB, but it doesn't seem possible without losing some of the geometry. |
Can you identify any of the ids of the missing features? |
Ok big sorry. I got mixed up with dataset revisions. Those missing features we in fact not missing in the dataset I provided and used for the vector tile generation comparison. |
Many thanks for the explanation. Ah makes more sense. So the best I could hope for in generating the resolution of 5cm that is supported in Mapbox/Maplibre without generating another zoom level is
Ok thanks once again. I was able to generate a cache with a max size of 1500000, which is still pretty good given the size and density of the datasets. Next I'm going to try and revisit this dataset mapbox/tippecanoe#311 |
Trying to tile another large dense dataset (this time a polygon), I get the following result: I used the same PR branch of code you provided.:
The result is pretty good, but it would be nice to reduce the tile sizes while trying to retain urban density and shape. Do you have any suggestions on the CLI above?? I increased the max file size to 3MB+ or which helped, but the download and rendering took too long for my liking Or is this about as good as I will get? I also noticed that increasing the detail at low zooms to a higher number than 12 (i.e., Here's example shots at z7 based:
The dataset is here. Many thanks |
@e-n-f Any thoughts on parcels generation? no worries if you don't have time. Can we get this code merged? It's looking pretty good for me. Greatly appreciated :-) |
Sorry for the delayed response. I am working on some other parcel-tiling issues now and appreciate having your dataset to try too. |
No problem, I can wait. Great that you are making use of the dataset |
The reason a higher detail like
I don't think you have many options left for decreasing the size of the tiles. You are already excluding most of the attributes and reducing the tile detail. You could reduce the tile buffer with |
These changes are merged as https://github.com/felt/tippecanoe/releases/tag/2.78.0 now. |
Thank you for merging the code! Also thank you for explanation of the impacts of the increased resolution. Adding Interesting looking at Felt.com service, which of course keep all of the attributes, it has a much denser looking result. Is felt using a much higher |
@e-n-f able to comment? |
What I'm trying to achieve
Render a 50 million-line cadastral survey observation dataset so that scale-independent view that renders keep the density and local shape in one vector-tile layer. I tried most of the Tippecanoe options but had little luck. So I tried to pre-calc data to render at specific scales and blend dense areas of short lines into point clusters to reduce the size while merging longer lines into the dataset so it looks good in sparser areas. Beyond z13, I just merged in the actual data. Here's my current process:
My process works ok if you style the points at a smaller enough size (say 1px or less). I'm wondering if I'm being silly here and if there is a smarter way to do it with just Tippecanoe commands or if the tools can be easily improved to do what I want. Also, ideally it would be good to get rid of the points and just have lines, but I fear this is not so easy when trying to keep the tile sizes down. This process takes about 2 hours on my M2 Macbook Pro with 12 cores (noting that most of it is single-core bound, like with OGR commands).
Here is the dataset
A couple of full renders of the dataset at large scales.
See here for what the tileset looks like in action.
Lastly here are the tile sizes by zoom level, which seems to be ok:
The text was updated successfully, but these errors were encountered: