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

Plugins: Add support for other tiled formats #943

Open
3 of 11 tasks
gkjohnson opened this issue Jan 23, 2025 · 5 comments
Open
3 of 11 tasks

Plugins: Add support for other tiled formats #943

gkjohnson opened this issue Jan 23, 2025 · 5 comments
Milestone

Comments

@gkjohnson
Copy link
Contributor

gkjohnson commented Jan 23, 2025

2D Formats

3D Formats

Notes

  • All implementations can use implicit tiling for the tile hierarchy.
  • Implicit tiling will expand every tile out into a JSON object when it doesn't have to be. Could possibly support some kind of "virtual" children that are pooled and initialized on usage, then reset every update. Then only as many tile objects as are needed for a single traversal are created.
@jo-chemla
Copy link
Contributor

Regarding OSM tiles, they indeed introduced a few months ago a production vector tiles endpoint which can be styled client-side: eg tilekiln-shortbread-demo from Paul Norman, and the official OSM forum thread, where style can be live-edited via TileJSON editors like Maplibre Maputnik, mappable or maptiler: https://vector.openstreetmap.org/shortbread_v1/{z}/{x}/{y}.mvt.

Regarding other types of Tiled 3D data, I just wanted to quote that loaders-gl has a section dedicated to tiled-3d-data loaders here, with support already live for OGC 3D Tiles and I3S. In their v5.0 roadmap, they aim for supporting other tiled formats like

  • COPC (Cloud Optimized PointCloud)
  • or Potree (v1, v2).

Also for what it is worth, I dreamt once about a TiTiler-like middleware but for 3d, but it did not gather attention (TiTiler is given an endpoint to a COG Cloud Optimized Geotiffs, and returns a live TMS endpoint with on-the-fly tile selection, mosaicking, merging and reprojection), to dissociate data format from consuming end-user application - zero-traction post and associated quick discussion in loader-gl repo.

@gkjohnson
Copy link
Contributor Author

Thanks for the info! Getting Potree working would be great considering some of the discussions in #912, as well. I'm less familiar with COPC - is this a widely used format? It looks fairly new, still. I'll have to take a look at the I3S format a bit more, too. The spec looked a bit difficult to understand and I'm not sure if it's really designed for web use.

TileJSON editors like Maplibre Maputnik, mappable or maptiler: https://vector.openstreetmap.org/shortbread_v1/{z}/{x}/{y}.mvt

Do you have a link to the spec that OSM uses for tiling? Is it something similar (or the same as) WMTS?

TiTiler is given an endpoint to a COG Cloud Optimized Geotiffs

Supporting Cloud Optimized Geotiffs directly should be possible, as well, with no middleware (looks like there are embedded LoDs). Sounds like something like TiTiler is good for enabling support in applications that only support WMTS but some of the these tiling formats are close enough to be on-the-fly converted client side.

@jo-chemla
Copy link
Contributor

jo-chemla commented Feb 5, 2025

From my point of view, Potree succeeded because it was one of the first, easiest way to tile massive pointclouds for web viewing, with a viewer and library with the right amount of tooling for measurement taking, clipping, POIs, and easiness to deploy for non tech-savvy users. So a lot of public and private organizations are using it, which result in a pretty large collection of datasets in that spec. The older v1 format stored the hierarchy tiles as individual files which were named by their index, which was pretty heavy on the filesystem during transfers, compression etc. Markus introduced the v2 format a few years back to alleviate these, resulting in a single file tiled pointcloud.

COG is simply a geotiff but with pyramid overviews (downsampled version of the file) and block memory-contiguity (for faster retrieval of a subset of the data), standardized. Titiler indeed takes advantage of that internal tiles structure to decide which portions of the file to read, retrieve them, reproject and merge on the fly, with gdal wizardy - I even got TiTiler to ingest not only COGs, but also other TMS like in this discussion.

COPC has been created by the team at hobu (folks behind eg PDAL), which has been dealing with massive pointclouds from a long time, eg 3DEP, the lidar coverage of the US as open-data. My understanding is they first created Entwine as an open spec, similar to potree, with extensibility in mind, but then got the inspiration from COG to create COPC. They extended the LAS file format, and describe how tiles should be described in header. If an app does not know COPC, it can just parse the file as a standard las. COPC os getting used more and more by national mapping agencies to publish their Lidar coverage, especially in US/Europe. PDAL is usually used to convert a standard pointcloud to COPC.

From my understanding, I3S never got traction outside of the ESRI ecosystem, which inceptionned it, especially in comparison to 3D-Tiles, which was pushed more by Cesium - especially with all the ecosystem of plugins for 3D render engines, now on Unreal, Unity, O3DE, Omniverse in addition to the web libs.

The /{z}/{x}/{y} used by OSM is indeed the standard TMS or XYZ tiling scheme (I often find myself looking back at this ref), in web mercator EPSG:3857 - with sometimes a Y-inversion with Google tiling, y_google = 2**zoom - y_tms - 1.

Hope, this all makes sense!

@gkjohnson
Copy link
Contributor Author

Great, thanks! This is all helpful information.

The /{z}/{x}/{y} used by OSM is indeed the standard TMS or XYZ tiling scheme (I often find myself looking back at this ref),

Can you explain the difference between TMS and WMTS, then? I've tried looking it up before but it wasn't super clear to me. A simple explainer would help.

@jo-chemla
Copy link
Contributor

jo-chemla commented Feb 5, 2025

TMS and XYZ are endpoint naming schemes/conventions, where tile indices (zoom-level=z, column=x and row=y) are usually represented surrounded by brackets. Any standard file server can act as a TMS server as long as tile files are stored with the described hierarchy directories, eg upper level directory for zoom, which each contain one folder per column, which itself contain one file per row - eg here satellite https://1.aerial.maps.ls.hereapi.com/maptile/2.1/maptile/newest/satellite.day/{z}/{x}/{y}/512/jpg. Other url examples for TMS include google satellite https://www.google.cn/maps/vt?lyrs=s@189&gl=cn&x={x}&y={y}&z={z}, where url-params are used rather than hierarchical directory.

WMS/WMTS is a more complex server specification, where the server has to serve raster tiles via the GetTile endpoint, but also other endpoints, like GetCapabilities which describe what the server can produce and CRS it handle. URLs are usually in the form https://wxs.ign.fr/essentiels/geoportail/wmts?SERVICE=WMTS&REQUEST=GetTile &VERSION=1.0.0&LAYER=ORTHOIMAGERY.ORTHOPHOTOS&TILEMATRIXSET=PM &TILEMATRIX={z}&TILECOL={x}&TILEROW={x}&STYLE=normal&FORMAT=image/jpeg. WMTS is a WMS server with tiles cached.

You can see a collection of WMS vs TMS endpoints on NextGIS QMS, with satellite endpoints for google, here, esri, bing (based on quadkey rather than xyz) etc.

This was referenced Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants