Comments (10)
Hi Damien,
Please have a look at https://github.com/bbox-services/bbox/tree/main/bbox-tile-server the successor of T-Rex. BBOX uses Xyz
of https://github.com/pka/tile-grid/blob/main/src/tile.rs#L44 which is already using u64 for x/y. So maybe your use case is already covered?
from t-rex.
Oh great, we'll give it a look. Thanks!
from t-rex.
Hi, thanks a lot for your help!
I planned to use bbox with the previous t-rex configuration file. I am using a user defined grid:
[grid.user]
width = 256
height = 256
extent = { minx = -20037508.3427892480, miny = -20037508.3427892480, maxx = 20037508.3427892480, maxy = 20037508.3427892480 }
srid = 3857
units = "m"
However I got
Error during initialization: 3857.json: No such file or directory (os error 2)
I was wondering what should be the contents of the 3857.json file?
If I remove the line srid = 3857 the following error is returned
Error during initialization: bbox-tile-server/config_lifemap.bbox - missing field `srid`
in `grid.user`
Best, thanks again
Simon
from t-rex.
Hi Simon,
I've added a guide for creating OGC conformant custom grid spec files and referenced it in the t-rex migration guide.
For your case here's the output of
morecantile custom --epsg 3857 --extent -20037508.3427892480 -20037508.3427892480 20037508.3427892480 20037508.3427892480 --name "CustomWebMercator" --title "Web Mercator with custom extent" | jq . >CustomWebMercator.json
Use this instead of 3857.json
and reference it with tms="CustomWebMercator"
.
from t-rex.
Thanks for your help Pirmin,
sorry I didn't understand which value should take the "srid" parameter then?
I though I should use CustomWebMercator instead 3857
[[datasource]]
dbconn = "postgresql://lm:gvC5b78Ch9nDePjF@localhost/tree"
name = "dbconn"
default = true
#[grid]
#predefined = "web_mercator"
[grid.user]
width = 256
height = 256
extent = { minx = -20037508.3427892480, miny = -20037508.3427892480, maxx = 20037508.3427892480, maxy = 20037508.3427892480 }
#srid = 3857
srid = "CustomWebMercator"
tms = "CustomWebMercator"
units = "m"
...
but I got
Error during initialization: bbox-tile-server/config_lifemap.bbox - invalid type: string "CustomWebMercator", expected i32
in `grid.user.srid`
PS I copied the CustomWebMercator.json in the assets directory, this is correct?
Sorry again to bother you
Best,
Simon
from t-rex.
OK,
I get it
I use
[grid]
json = "../assets/CustomWebMercator.json"
tms = "CustomWebMercator"
thanks again
Simon
from t-rex.
In BBOX, the tms name is part of the tileset configuration, so you can have tilesets with differenct tile grids:
[[grid]]
json = "../assets/CustomWebMercator.json"
[[tileset]]
name = "my tileset"
tms = "CustomWebMercator"
This is not directly translatable from a t-rex configuration file. You have to create a bbox configuration file from the converted t-rex configuraton output and apply the changes above.
from t-rex.
Since you're mentioning zoom level 42, here's the command for creating a grid with max level 42:
morecantile custom --epsg 3857 --maxzoom 42 --extent -20037508.3427892480 -20037508.3427892480 20037508.3427892480 20037508.3427892480 --name "CustomWebMercator" --title "Web Mercator with custom extent" | jq . >CustomWebMercator.json
from t-rex.
Hi Pirmin,
First, thanks a lot for your help. And sorry for this long message. We tried with @simonpenel to prepare a small example showing the bug we are facing when zooming in the map, and for which we are struggling finding a solution. If it is obvious for you what happens an how to solve it, it would be great !
The symptom : if you zoom in the simple map (only black) we prepared at this url: http://134.214.213.45/assets/html/index_test42.html, you will see that starting from zoom 27, some tiles do not display correctly, creating some kind of irregular checkerboard
The reproducible example: To make the problem very simple and easily reproducible we decided that the map only displays one tile (always the same, named 1.pbf).
The server configuration file was this one this one :
[[datasource]]
#will not be used
name = "gebco"
[datasource.wms_proxy]
baseurl = "https://www.gebco.net/data_and_products/gebco_web_services/web_map_service/mapserv?version=1.3.0"
format = "image/jpeg"
[[assets.static]]
dir = "./assets"
path = "/assets"
[[tilestore]]
name = "tilecache"
[tilestore.files]
#base_dir = "../tiles"
base_dir = "/tmp/mvtbench"
[[tilestore]]
name = "mbtilecache"
[tilestore.mbtiles]
path = "/tmp/tilecache.mbtiles"
[[tilestore]]
name = "pmtilecache"
[tilestore.pmtiles]
path = "/tmp/tilecache.pmtiles"
[[tileset]]
name = "gebco"
wms_proxy = { source = "gebco", layers = "gebco_latest" }
and the configuration json files used are available here:
mystyle_test42.json
lines_test42.json
Do you have any idea where the problem could come from?
All the best, and thanks again for your time,
Damien
from t-rex.
Back from holidays. Will try to reproduce this problem with bbox test data and the custom Mercator TMS.
Could you open an issue in the bbox Repo?
from t-rex.
Related Issues (20)
- How to configure t-rex to use a database function with PostGIS ST_AsMVT HOT 2
- corrupted polygons with clipping tile borders
- jammy packaging for 0.14x HOT 9
- --cache command line option ignored HOT 2
- Unable to generate tiles, tile extents appear to be wrong ... HOT 1
- t-rex vs other MVT servers? HOT 1
- gdal 3.5 support HOT 1
- Error in loading vector tiles with standalone mapbox gl js viewer HOT 1
- What default tile size is used by Trex? 256 or 512? HOT 1
- Polygon Shift: Custom Projection HOT 2
- cargo build error for GDAL HOT 6
- Parallel calls performance with geopackage as datasource HOT 1
- t-rex doesn't recognize the CRS/SRS HOT 1
- Debian packages for bookworm HOT 3
- Invalid MBTiles metadata.json HOT 4
- Buffer region not served as part of the vector tile HOT 2
- T-Rex doesn't handle invalid geometry results correctly when transforming between coordinate systems HOT 9
- Custom tile grid resolutions beginner's question HOT 1
- Empty response
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from t-rex.