mapbox / rio-rgbify

Encoded arbitrary bit depth rasters in pseudo base-256
MIT License
99 stars 36 forks source link

Invalid CRS: "init='epsg:3857' while creating mbtiles #14

Open planemad opened 6 years ago

planemad commented 6 years ago

Have been trying to create an mbtiles with a 2 band data tif that i have :

rio rgbify india-pop-density.tif india-pop-density.mbtiles --max-z 10 --min-z 2

but I get this error:

rasterio.errors.CRSError: Invalid CRS: "init='epsg:3857'"

cc @dnomadb @perrygeo

planemad commented 6 years ago

Tried this on a couple of different rasters with the same error.

alo8 commented 6 years ago

In file mbtiler.py, try replacing "init='epsg:3857'" by just "epsg:3857". This should fix the issue.

vincentsarago commented 6 years ago

you can also pip install this branch https://github.com/mapbox/rio-rgbify/tree/sgillies-patch-1. I'll see if we can merge it and make a new release soon.

andrewharvey commented 5 years ago

@vincentsarago that PR works for me. Hope it can be merged and released.

vincentsarago commented 5 years ago

👋 Hi @andrewharvey, sadly I don't have the power to merge the PR, we'll have to see with @dnomadb or @sgillies (sorry guys)

sgillies commented 5 years ago

Sorry, folks, I've got no ETA for an update of this package.

kannes commented 1 year ago

For anyone ending up here, the fix from https://github.com/mapbox/rio-rgbify/tree/sgillies-patch-1 has long been fixed in this repo (in https://github.com/mapbox/rio-rgbify/commit/822aafc06ce2f7c2247b24cfafdddc43b68a846e).

But the pip installable package is older than that.

You can install the latest development version from this repository using pip install git+https://github.com/mapbox/rio-rgbify. Check afterwards with pip freeze | grep rio-rgbify.