Skip to content
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

Add tree canopy layer to Mapbox style #110

Open
mradamcox opened this issue Nov 21, 2023 · 3 comments
Open

Add tree canopy layer to Mapbox style #110

mradamcox opened this issue Nov 21, 2023 · 3 comments
Labels
new data adding a new feature data layer question Further information is requested

Comments

@mradamcox
Copy link
Collaborator

This is a very large file that needs to be converted to mbtiles (vector) and uploaded to Mapbox via their uploads API. Almost had this working and then the load errored with the message:

Tile exceeds maximum size of 500k at z10. Reduce the detail of data at this zoom level or omit it by adjusting your minzoom.

May need to use Tippecanoe to gain more fine-grained control over the output file.

This was referenced Nov 21, 2023
@mradamcox
Copy link
Collaborator Author

After much more work on this, I've figured out a few things that make me think this task should be put on hold until we have the more recent canopy dataset.

The original MB tileset was created via direct upload through their studio interface, and since that time MB has implemented a 300mb limit on direct uploads which is far too small for this dataset (a geojson version is ~15gb). Beyond this, I've figured out that during the processing of the original upload, MB dropped a significant number of features, presumably in order to get under the default size limit of 500kb per tile.

image

With this in mind, I think the following process is what I recommend going forward, and because it's a bit involved I think it's worth just waiting until we get the new data so that we can do it only one time (these steps could all be done with QGIS or PostGIS, or a combination as needed):

  • reproject to web mercator
  • fix geometries
  • remove all attributes/fields
  • clip to cook county
  • run a dissolve operation to reduce overall number of features and vertices
  • recalculate shape area and add this as a field
  • tile with tippecanoe
  • use Uploads API to get the tileset into Mapbox

Here's a screenshot of the style that was applied in the past and should be reapplied to the final layer in the style:

image

@mradamcox mradamcox added the question Further information is requested label Dec 4, 2023
@Makosak
Copy link
Collaborator

Makosak commented Dec 8, 2023

Will link in the Regional Trees Institute for this question; @mradamcox will include you on the email for intros

@Makosak
Copy link
Collaborator

Makosak commented Apr 7, 2024

Wanted to follow up on this ~

@Makosak Makosak added the new data adding a new feature data layer label Apr 10, 2024
@Makosak Makosak added this to the Spring Tasks 2024 milestone Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new data adding a new feature data layer question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants