Add {bbox} and {bbox_3857} URL substitution for WMS proxy support#54
Open
catapulta wants to merge 1 commit intoSignalK:masterfrom
Open
Add {bbox} and {bbox_3857} URL substitution for WMS proxy support#54catapulta wants to merge 1 commit intoSignalK:masterfrom
catapulta wants to merge 1 commit intoSignalK:masterfrom
Conversation
Allows WMS chart sources to be proxied and cached by converting tile coordinates to bounding box parameters in the remote URL. This enables caching for services like the NOAA Chart Display Service (S-57 ENC) that only offer WMS endpoints.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
{bbox}and{bbox_3857}URL substitution to the tile proxy so WMS chart sources can be proxied and cached alongside regular tile sources.NOAA retired their RNC tile service and the Chart Display Service now serves S-57 ENC data through WMS only — no XYZ tile endpoint. This makes caching impossible with the current proxy since it only does
{z}/{x}/{y}substitution.Addresses #53
What changed
{bbox}replaced withminLon,minLat,maxLon,maxLat(EPSG:4326){bbox_3857}replaced with the same bounds in Web MercatortileToBBoxpromoted fromprivatetostatic(already existed, just needed to be callable from the staticfetchTileFromRemote)lonLatToMercatorhelper for the 3857 projectionNo changes to config schema, proxy routes, or caching/seeding — those already work on tiles internally. Fully backwards compatible: the bbox logic only fires if the URL contains
{bbox}or{bbox_3857}, existing configs are untouched.Example: NOAA S-57 ENC with caching
tilelayerpnghttps://gis.charttools.noaa.gov/arcgis/rest/services/MCS/NOAAChartDisplay/MapServer/exts/MaritimeChartService/WMSServer?service=WMS&version=1.3.0&request=GetMap&layers=0,1,2,3,4,5,6,7,8,9,10,11,12&styles=&crs=EPSG:3857&bbox={bbox_3857}&width=256&height=256&format=image/png&transparent=trueTesting
{z}/{x}/{y}tile sources continue to work unchanged