t-rex-tileserver / t-rex

t-rex is a vector tile server specialized on publishing MVT tiles from your own data
https://t-rex.tileserver.ch/
MIT License
545 stars 68 forks source link

added optional srid to extent parameter of generate command #236

Closed arbakker closed 3 years ago

arbakker commented 3 years ago

This PR adds an optional srid item to the --extent parameter of the generate command like so:

generate --config config.toml --extent 132608.7000,475796.5511,154910.3484,497819.7047,28992  

In the above example the extent is in EPSG:28992 (Dutch national projection).

The usecase for this is the following: in our case we generate tiles in EPSG:28992 and pretile the data, because the dataset contain some fairly big and complex geometries. These pretiled datasets need to tiled in different jobs that allign exactly, this is not possible with WGS84 extents. Reprojecting extents between WGS84 and RD slightly changes the extent.

Also renamed some methods to better reflect the new situation.

pka commented 3 years ago

CI got you ;-) Could you please remove Cargo.lock from the PR (will update it separately)?

arbakker commented 3 years ago

Computer says no :-D. Fixed the formatting issue and restored the Cargo.lock file. Regarding the Cargo.lock, my VSCode IDE keeps automagically updating the Cargo.lock file. But if the dependencies don't change the Cargo.lock file does not need any updating, no?