-
Notifications
You must be signed in to change notification settings - Fork 25
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
Switch to pyproj for new morecantile major release #62
Comments
I'm still not 💯 sure we should do this 🤷♂️ Cons
Pro
I would love if people could help me decide here 🙏 |
I would prefer GDAL + PyProj over RasterIO. RasterIO is a useful abstraction and perhaps makes packaging GDAL easier, but removing it exposes much more GDAL internals and is very powerful overall. |
@vincentsarago here are my two cents: Background: I have used morecantile to access WMTS services from Intermap (they provide tiles in a weird non-standard tiling system that they have defined, and morecantile made it a breeze to access this data). |
I think that projects like xarray-leaflet or xpublish (xpublish-community/xpublish#88) may eventually benefit from morecantile without rasterio as dependency. |
Thanks everyone 🙏
So rasterio comes with GDAL+PROJ compiled C lib but do not provide access to the functions directly. PyProj comes only with PROJ C libs but again you don't have direct access to it. For us, moving from rasterio to pyproj just remove the GDAL part, but if you really need it you can still install rasterio or GDAL. As I said earlier, morecantile use only the @benbovy @davidbrochart That's awesome, thanks for sharing 🙏 |
in #58 we are proposing a major change to this library.
When we started the development of morecantile we choose to use rasterio only to avoid adding requirements like pyproj (because morecantile was mostly made to work with rio-tiler). In addition for a long time rasterio wheels were stuck at proj 6 while pyproj were already using proj>=7, so we wanted to avoid using coordinates coming from 2 different proj version.
Now that rasterio wheels uses proj>=7, if think we are in a better place to switch to pyproj and thus remove rasterio from this libraries.
The main motivation is trying to avoid some weird behaviour with coordinate re-projection which seems to be better handled by proj (with rasterio, you use GDAL which use proj while with pyproj you directly use Proj).
The PR is ready and the CI passes (still trying to match mercantile tests)
What it means for libraries using morecantile
Mostly nothing. The biggest breaking change is the
type
of CRS being returned bymorecantile.TileMatrixSet.crs
property, which is now of typepyproj.CRS
instead ofrasterio.crs.CRS
. This is used in rio-tiler for example (https://github.com/cogeotiff/rio-tiler/search?l=Python&q=tms.crs). To help with the transition we are addingmorecantile.TileMatrixSet.rasterio_crs
property which will return arasterio.crs.CRS
. This method will only be available is rasterio is installed.If no negative feedback, we'll do a pre-release next week
The text was updated successfully, but these errors were encountered: