Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

CRSError: CRS is empty or invalid: u'' #21

Closed
andrewharvey opened this issue Dec 21, 2018 · 8 comments
Closed

CRSError: CRS is empty or invalid: u'' #21

andrewharvey opened this issue Dec 21, 2018 · 8 comments

Comments

@andrewharvey
Copy link
Contributor

rio rgbify --min-z 0 --max-z 14 --format png LHI.tiff LHI.mbtiles

Traceback (most recent call last):
  File "/rio-rgbify/rio_rgbify/scripts/cli.py", line 84, in rgbify
    tiler.run(workers)
  File "/rio-rgbify/rio_rgbify/mbtiler.py", line 355, in run
    tiles):
  File "/usr/lib/python2.7/multiprocessing/pool.py", line 673, in next
    raise value
CRSError: CRS is empty or invalid: u''

Traceback (most recent call last):
  File "/usr/local/bin/rio", line 11, in <module>
    sys.exit(main_group())
  File "/lib/python2.7/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/lib/python2.7/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/lib/python2.7/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/lib/python2.7/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/lib/python2.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/lib/python2.7/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/rio-rgbify/rio_rgbify/scripts/cli.py", line 84, in rgbify
    tiler.run(workers)
  File "/rio-rgbify/rio_rgbify/mbtiler.py", line 355, in run
    tiles):
  File "/usr/lib/python2.7/multiprocessing/pool.py", line 673, in next
    raise value
rasterio.errors.CRSError: CRS is empty or invalid: u''

LHI.tiff.zip

@andrewharvey
Copy link
Contributor Author

Not sure I'f I'm making progress or just digging a deeper hole for myself, but if I change

dst_crs="init='epsg:3857'",

to

dst_crs="epsg:3857",

I no longer get the above error, but instead get

/home/user/.local/lib/python2.7/site-packages/rasterio/__init__.py:225: NotGeoreferencedWarning: Dataset has no geotransform set. The identity matrix may be returned.
  **kwargs)
/home/user/.local/lib/python2.7/site-packages/rasterio/__init__.py:225: NotGeoreferencedWarning: Dataset has no geotransform set. The identity matrix may be returned.
  **kwargs)
ERROR 4: No such file or directory
ERROR 4: No such file or directory
/home/user/.local/lib/python2.7/site-packages/rasterio/__init__.py:225: NotGeoreferencedWarning: Dataset has no geotransform set. The identity matrix may be returned.
  **kwargs)
/home/user/.local/lib/python2.7/site-packages/rasterio/__init__.py:225: NotGeoreferencedWarning: Dataset has no geotransform set. The identity matrix may be returned.
  **kwargs)
ERROR 4: No such file or directory
ERROR 4: No such file or directory

@andrewharvey
Copy link
Contributor Author

Made sure to wipe all my local python libs and re install rio-rgbify, now getting:

CRSError: The WKT could not be parsed. OGR Error code 5

@andrewharvey
Copy link
Contributor Author

To sum up, both #18 and #15 fix this issue, so I'll close this as duplicate of #14.

It still gives the errors in #21 (comment) but it seems to generate the write outputs, so I'll just ignore the errors.

@kylebarron
Copy link

Installing from master seemed to fix my "CRSError: The WKT could not be parsed. OGR Error code 5" errors

@frodrigo
Copy link
Contributor

Install all master and using python3 go over the issue for me.

@farfromrefug
Copy link

@frodrigo what do you mean by install "all master" ?
I am facing that issue right now

@frodrigo
Copy link
Contributor

Not sure it change something, but I install git master of rasterio and rio-rgbify.

@ghigio2000
Copy link

I am getting the same error right now.
I tried both on Windows and Ubuntu, no difference.
I suspect it is my input GeoTiff file? Is there a spec how the GeoTiff format must be?
I am trying to convert SRTM HGT files into GeoTiff and then to mbtiles using rio-rgbify.
But I am getting the "CRSError: The WKT could not be parsed. OGR Error code 5" error.
Thanks for your help.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants