[pygeoapi] Externalizing tile matrix sets and supporting custom TMS registration

Linda Karlovská linda.karlovska at seznam.cz
Fri Aug 1 02:49:31 PDT 2025


Hi everyone,




I'm working with vector tiles on cadastral data using a custom tile matrix 
set (specifically one based on EPSG:5514 — see https://github.com/
OpenGeoLabs/tiles-cz/blob/main/03-tile-matrix-set.md, it's the second TMS 
listed, though only in Czech).




While exploring the pygeoapi code, I noticed that two standard tile matrix 
sets are currently hardcoded here:
https://github.com/geopython/pygeoapi/blob/master/pygeoapi/models/provider/
base.py
(https://github.com/geopython/pygeoapi/blob/master/pygeoapi/models/provider/base.py)

As I understand it correctly, there's currently no built-in way in pygeoapi 
to register or load additional tile matrix sets dynamically.

To improve flexibility, I'd like to propose a small refactor and extension:

   1. 
   Move the two hardcoded TMSs into separate JSON files (e.g., WorldCRS84
   Quad.json) in a new folder such as pygeoapi/models/provider/
   tilematrixsets/.
   2. 
   Add functionality to allow users to define their own custom tile matrix 
   sets by simply adding a JSON file to that directory (e.g., for my use 
   case, S-JTSKQuad.json).
   

Does this direction make sense from the perspective of the current 
architecture?
And are there any things I should keep in mind when implementing this 
change?




Thanks a lot for your time and feedback!




Best regards,
Linda Karlovska
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pygeoapi/attachments/20250801/84c43a50/attachment.htm>


More information about the pygeoapi mailing list