-
-
Notifications
You must be signed in to change notification settings - Fork 236
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
support different coordinate reference systems like EPSG:4326
#343
Comments
Try Function Source mabe. |
Is there a plan for tile schema not 3857? @stepankuzmin |
Not at the moment, but we might consider this in the future. Is there a real need for this? |
For us, at least 4326 would be relevant. Even MapTiler started selling 4326 tiles: https://documentation.maptiler.com/hc/en-us/articles/4405462253073-OpenStreetMap-in-WGS84-EPSG-4326- So this should have also relevance for others. |
We use a lot 4490,4544 by a lightweight tile server based on PostGIS. |
This is particularly relevant for us. We work on non-terrestrial bodies (Moon, Mars, etc.). In fact, coupling to the EPSG authority is problematic. The authority for planetary projection codes is the International Astronomical Union (IAU). Being able to define a custom tile matrix set allows us to use appropriate body radii, etc. If and when this work is undertaken, I would strong advise considering non-EPSG authorities. |
I will be happy to accept any PRs for this capability. If anyone is interested, please comment on your proposed solution, i.e. how the code should be restructured to support such cases. I would advise looking at the upcoming new code structure that I'm hacking on in #456 and partially described in the #430 discussion. The goal is to support any data backends, including multiple postgress connections, mbtiles, etc. |
ASFAIK, the tile bounds generated for a given tile coordinate(z,x,y) is the key, then it is the same for encoding the data clipped from the source to MVT. For PostGIS source, martin use
Also there is an example for tile envelope in
Then the next job is how to expose the optional For MBTiles, I have no idea at the moment. |
Technically, the ST_TileEnvelope accepts a SRID parameter, but i am not certain it is implemented yet. In theory, the best path may be to implement needed srid support in postgis directly, but in the mean time, Martin could be modified to use the The functions source could be made to produce anything at all, but there will need to be a way to tell Martin that the SRID is non-standard so it produces the correct TileJSON. For the sources that already contain/produce data in the 3857, we could in theory decode those tiles and re-encode them on the fly. Lots of funky math, but a worthy project nevertheless. |
|
…cator. To help address maplibre#343
EPSG:4326
Apparently morecantile project defines non-web-mercator projections for tiles. Moreover, @pka 's https://crates.io/crates/tile-grid seems to be using some of that. Perhaps we should rely on that crate more, or at least adapt some of the ideas? This might also be useful for #1676 by @sharkAndshark ? Moreover, |
I was thinking this these days. A very naive draft here. Let's talk and read more references like the the configuration# tile schema would be default to xyz, no option for this for now, PR is welcome
tilegrid:
custom_1:
srid: 4326
# min_zoom: 0 should we allow the user set minzoom/maxzoom in custom tile grid either?
# max_zoom: 30
bounds:
- -180.0
- -90.0
- 180.0
- 90.0
tilesize: 4096 # optional. Default to 4096, would be used in the ST_AsMVTGeom function
custom_2:
srid: 4326
bounds:
- -180.0
- -90.0
- 180.0
- 90.0
tilesize: 4096
postgres:
connection_string: 'postgresql://postgres@localhost:5432/db'
tile_grid: custom_1
auto_publish:
from_schemas:
- public
- my_schema
tables:
tile_grid: custom2
from_schemas: my_other_schema
extent: 4096 # if custom2 is set, should we rewrite the custom2.tilesize?
tables:
table_source_id:
tile_grid: custom2
minzoom: 0 # should we allow the user set minzoom/maxzoom in custom tile grid either?
maxzoom:
extent: 4096 # if custom2 is set, should we ignore this? Guess no? the catalogThere would be a tilegrid in "tiles": {
"table1":{
"tileGrid": "custom_1",
}
},
tile_grid: {
"some_custom_grid": {
"extent": [
1620750.2508,
4271892.7153,
1625870.2508,
4277012.7153
],
"maxZoom": 3,
"minZoom": 0,
"origin": [
1620750.2508,
4277012.7153
],
"tileSize": [
4096,
4096
]
},
"some_custom_grid_2": {
...
},
"a tile grid parsed from COG file woude be added here automatically by martin": { // to make things simpler and step by step, maybe talk about cog later. Just focus on the custom tile grid things.
...
},
} |
To load tiles from COG the fields in #1676 is required. To make the users not confusing, I suggested to remove the doc of cog before * find generally way to support non web mercator tile grid in martin * find the way to tell user the fields in #1676 Let's see cog as a nightly feature I will keep working on this. And I've pinned the #343 , get more inspiration form other repos and talk more there! @nyurik
Is it possible to use Maritn to output vector tiles in EPSG:4326 coordinate reference system?
The text was updated successfully, but these errors were encountered: