add wmts wms tms urltemplate rasterOverlay
@chengdz , thanks so much for this contribution! I've been wanting to do this myself. It would be very useful if you could write a couple of test files that show off how to use these new classes.
thanks for your suggestion! I have already added a couple of test files
I gave this a try. I think you forgot to check in changes to src/vsgCs/CMakeLists.txt.
The overlay-urlTemplate.json test worked. Very nice! The other tests failed with various errors:
$ /opt/bin/worldviewer --ion-token-file ~/ion-token tests/overlay-wmts.json
info: Selected sRGB window 0.0289912 0.0289912 0.133209 1
Warning: miniCompile did recording!
[2025-02-27 15:44:19.811] [error] [ErrorList.h:89] Errors while loading image for tile:
- Received response code 500 for image https://ows.terrestris.de/osm/service?request=GetTile&version=1.0.0&service=WMTS&format=image%2Fpng&layer=HikeMap&style=default&tilematrixset=hikemap_grid&tilematrix=0&tilerow=0&tilecol=0.
[2025-02-27 15:44:19.811] [error] [ErrorList.h:89] Errors while loading image for tile:
- Received response code 500 for image https://ows.terrestris.de/osm/service?request=GetTile&version=1.0.0&service=WMTS&format=image%2Fpng&layer=HikeMap&style=default&tilematrixset=hikemap_grid&tilematrix=0&tilerow=0&tilecol=0.
$ /opt/bin/worldviewer --ion-token-file ~/ion-token tests/overlay-tms.json
info: Selected sRGB window 0.0289912 0.0289912 0.133209 1
[2025-02-27 15:45:20.264] [error] [RasterOverlayCollection.cpp:150] Error while creating tile provider: curl: Could not connect to server
Warning: Error while creating tile provider: curl: Could not connect to server
$ /opt/bin/worldviewer --ion-token-file ~/ion-token tests/overlay-wms.json
No error, but no imagery on the globe.
If a demo requires an API key to work at all, you should add a comment in the test file. I realize that I haven't done that with any of the Cesium ion tests...
I have fixed overlay-wmts.json and overlay-wms.json test file configuration error, but there are relatively few publicly available TMS metadata services,if you know, modify the url address in the overlay-tms.json file to test it, thanks
I found a TMS service in Rocky, it's so far away and right in front of me
This is really excellent; thanks for the contribution. I've pushed this pull request as the topic branch chengz/addRasterOverlay and merged it to the next branch so that people can play with it before it goes into master. I will have some notes on the code.
One thing I'd love to see is support for designating a color to represent transparent pixels, so that a map with a monochrome background could be overlayed on photo imagery. I thought about doing this in the fragment shader, but I think that's not going to work with filtering, sRGB->linear, etc., so best done in vsgResourcePreparer::prepareRasterInLoadThread.
FYI, I prefer that master not be merged into topic branches and pull requests. I realize that the build system has changed since you started this branch and that it might not be obvious how to build your branch in isolation anymore; what I would do is create a local integration branch with your topic merged into master. You can commit changes on top of that and then, when ready for review, rebase any new changes onto the topic branch.
At the moment the next branch is sort of an example of that; I was able to merge the addRasterOverlay branch to it with no problems and test it out with all the latest stuff.
I've merged your review changes to chengz/addRasterOverlay and to next. This is looking good. I added an example with OpenRailwayMap, which is nice because it has alpha transparency.
Thanks for the review! Let me know if there's anything else needed from my side.
This has been merged to master. Thanks @chengdz !