question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Serving vector tiles

See original GitHub issue

Instead of {z}/{x}/{y}.png I’d like {z}/{x}/{y}.pbf

I’ve generated something before like this:

tippecanoe -Q --no-tile-compression --no-tile-size-limit --minimum-zoom=7 --maximum-zoom=7 --drop-rate=1 --output-to-directory=file/ file.geojson

I imagine this would be the centroids of each pixel as a vector point? Do you think this is possible?

Do GeoTiff COG overviews hinder access to the native resolution pixels of the COG? It would be nice to serve native resolution vector-tile-pixels up to a desired zoom level.

Can overview pixels be accessed explicitly? that might be interesting to experiment with for higher zoom levels than a client could easily process

somewhat related to: https://github.com/DHI-GRAS/terracotta/issues/11 <-- is this the same thing? https://github.com/DHI-GRAS/terracotta/issues/44#issuecomment-420415547

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
dionhaefnercommented, Jul 7, 2021

I’m not sure how much work it would be to offer vector tile output, maybe it’s not that bad since rio-tiler has already done the hard part for us 😃

That being said, I’m not quite convinced that this is a nice use case. But if you really want this and put in a PR I could imagine to merge it.

Regarding your issues:

  • Filtering across multiple images (a pixel is only shown when all of the selected attributes are within a user-specified range). I’m assuming this could probably done with /compute route and some boolean logic. (All of my rasters were processed with target-aligned-pixels–but what happens if they weren’t? does /compute require images have the same extent?)

/compute should work well for this. There are no requirements in terms of alignment, as the computation is done on the final tile (which is always on the same xyz grid).

  • Display the exact value of a “pixel” on mouse-click. I can easily do this when it is vector. I thought I saw a /latlon route when I investigated terracotta a couple weeks ago but I don’t see it now ? maybe I am mis-remembering

Not possible out of the box, but there are some tricks you can use. We’ve discussed this here.

  • Custom colorscale actually might be easier than I thought. The non-dynamic scaling format seems easy enough. I could do something like this?: .png?colormap={0.0: ‘#ffffd9’, 17.691: ‘#edf8b1’, 35.382: ‘#c7e9b4’, 53.074: ‘#7fcdbb’, 70.764: ‘#41b6c4’, 88.455: ‘#1d91c0’, 106.147: ‘#225ea8’} <-- ahhh… this is rounding to the nearest key? but I need explicit steps (min or max) hmm… 😕

It sounds like what you want is actually a custom colormap. The explicit format you quote is meant for categorical data, where you can match values to colors 1:1. If you want interpolation between values, you need a custom colormap.

1reaction
dionhaefnercommented, Jul 15, 2021

Did this end up working for you @chapmanjacobd ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Serving Dynamic Vector Tiles from PostGIS - Crunchy Data
Vector tiles are a transport format for efficiently sending map data from a server to a client for rendering. The vector tile specification ......
Read more >
Serving Vector Tiles - Paul's Blog
Tilemaker is built around the idea of vector tiles without a serving stack. It does this by doing an in-memory conversion directly from...
Read more >
Vector tile services—ArcGIS Server
A vector tile service is an ArcGIS Server web service originating from a vector tile package in ArcGIS Pro. Vector tile services (also...
Read more >
Serve maps with TileServer GL - OpenMapTiles
TileServer GL supports both serving vector as well as raster tiles (through Mapbox GL Native). It is also providing a WMTS endpoint. For...
Read more >
Vector tiles introduction | Tilesets - Mapbox docs
Vector tiles make huge maps fast while offering full design flexibility. ... of tiling: optimized for caching, scaling, and serving map imagery rapidly....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found