Skip to content

Conversation

@blacha
Copy link
Member

@blacha blacha commented Feb 5, 2025

Motivation

We are starting to want to view imagery in other projections that do not have a standard Web Quad tile matrixes to work with. It would be helpful to have a way to generate a debug tile matrix that aligns with the WebMercatorQuad standard scales, while also being a quad starting at 1x1 -> 2x2 -> 4x4 grids that increase with powers of two.

Modifications

Added a CITM Debug tile matrix based off the WebMercatorQuad scales.

Added a script to generate tile matrices from a supplied EPSG projection,

The script will download the projection extent from a projjson, then calculate an appropriate WebMercatorQuad scale that will cover the entire projection extent,

This script was only tested with CITM and NZTM it will likely fail if used with other projections.

Verification

Tested basemaps server with QGIS and some CI topo50 mapsheets.

image

@blacha blacha changed the title Feat/citm debug tile matrix feat: CITM2000 debug tile matrix Feb 10, 2025
@tawera-manaena
Copy link
Contributor

This script was only tested with CITM and NZTM it will likely fail if used with other projections.

We have a Jira ticket that lists the EPSG codes for each Topo Raster Map Series. I'll run some through the script and see what happens.

@tawera-manaena
Copy link
Contributor

tawera-manaena commented Feb 16, 2025

@blacha - I'm hitting the inequality check here. Looks like the xyOrder and axisOrder variables hold values for different coordinate spaces. xyOrder being cartesian and axisOrder being geographic. I don't imagine the inequality check intends for this?

# TargetProjection = 3793;

# xyOrder: 'yx'
# axisOrder: 'n,e'
Error: getXyOrder: yx is not the same as expected ordering from proj json

@blacha
Copy link
Member Author

blacha commented Feb 16, 2025

@blacha - I'm hitting the inequality check here. Looks like the xyOrder and axisOrder variables hold values for different coordinate spaces. xyOrder being cartesian and axisOrder being geographic. I don't imagine the inequality check intends for this?

# TargetProjection = 3793;

# xyOrder: 'yx'
# axisOrder: 'n,e'
Error: getXyOrder: yx is not the same as expected ordering from proj json

This should now be fixed, it only handled when the axis was labelled x or y not n or e

@tawera-manaena
Copy link
Contributor

We have a Jira ticket that lists the EPSG codes for each Topo Raster Map Series. I'll run some through the script and see what happens.

@blacha - I've run the script with the following EPSG codes:

Funnily enough, they are all defined in [y, x]. So, we'll need to update the getXyOrder function to handle this once we support these EPSG codes. Otherwise, I've checked the GeoJSON bounds in QGIS and the generated TileMatrix definitions. Both of which look good. I'm happy to approve this work.

@blacha blacha marked this pull request as ready for review February 20, 2025 01:20
@blacha blacha requested a review from a team as a code owner February 20, 2025 01:20
@blacha blacha added this pull request to the merge queue Feb 23, 2025
Merged via the queue into master with commit 4bb91bd Feb 23, 2025
14 checks passed
@blacha blacha deleted the feat/citm-debug-tile-matrix branch February 23, 2025 20:51
@blacha blacha mentioned this pull request Mar 17, 2025
github-merge-queue bot pushed a commit that referenced this pull request Mar 17, 2025
[7.15.0](v7.14.0...v7.15.0)
(2025-03-17)


### Bug Fixes

* **lambda-analytic-cloudfront:** process logs upto one hour ago
([#3409](#3409))
([8d9609d](8d9609d))


### Features

* CITM2000 debug tile matrix
([#3397](#3397))
([4bb91bd](4bb91bd))
* **cogify:** Update cogify to support the topo raster processes.
BM-1116 ([#3388](#3388))
([4366df6](4366df6)),
closes
[/github.com//issues/3365#issuecomment-2445444420](https://github.com//github.com/linz/basemaps/issues/3365/issues/issuecomment-2445444420)
* **shared:** support multiple credential locations
([#3407](#3407))
([92de7c4](92de7c4)),
closes
[/github.com/linz/argo-tasks/blob/master/src/fs.register.ts#L132](https://github.com//github.com/linz/argo-tasks/blob/master/src/fs.register.ts/issues/L132)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants