Closed bmulcahy closed 5 years ago
When I ran this locally, I got a stack trace that looked like this:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 2309, in __call__
return self.wsgi_app(environ, start_response)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 2295, in wsgi_app
response = self.handle_exception(e)
File "/usr/local/lib/python2.7/dist-packages/flask_cors/extension.py", line 161, in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1741, in handle_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 2292, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1815, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python2.7/dist-packages/flask_cors/extension.py", line 161, in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1718, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1813, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1799, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/opt/marblecutter/virtual/web.py", line 120, in render_png
scale=scale,
File "/usr/local/lib/python2.7/dist-packages/marblecutter/tiling.py", line 47, in render_tile
expand=expand,
File "/usr/local/lib/python2.7/dist-packages/marblecutter/__init__.py", line 349, in render
sources, bounds, shape, target_crs, expand
File "/usr/local/lib/python2.7/dist-packages/marblecutter/mosaic.py", line 97, in composite
source.recipes, window_data, source=source, expand=expand
File "/usr/local/lib/python2.7/dist-packages/marblecutter/recipes.py", line 24, in apply
dtype_min = np.iinfo(data.dtype).min
File "/usr/local/lib/python2.7/dist-packages/numpy/core/getlimits.py", line 506, in __init__
raise ValueError("Invalid integer data type %r." % (self.kind,))
ValueError: Invalid integer data type 'f'.
I fixed that in: https://github.com/mojodna/marblecutter/commit/29f75ecaed0d4fb15de6872fac2efac7f90842b6
After, it looks like:
(This is rolling out to tiles.rdnt.io now)
It looks a bit cyclical, similar to what @fredliporace noted in https://github.com/mojodna/marblecutter/commit/0fdc263bc519503f81ff8db8ed6a62248cf079dd#commitcomment-32508381
I'm going to see if I can get it to render a more normal ramp.
Reopening to deal with output weirdness.
This is what I have locally now; I need to do some more cleanup before merging it:
If you need any more information let me know.
That does look much better. Was it just an issue of the data ranges? Also are your docker scripts current which one should I use? This, marblecutter, or marble cutter virtual?Also for questions like these which is the best repo to ask against?
No, it was how data was being rescaled (and the array types into which it was being updated). I think I'd missed it before because I was visualizing other float data (DEMs in that case) as hillshades, rather than using the translation to greyscale imagery.
The fix was in https://github.com/mojodna/marblecutter/commit/8331bf19825bd967870b29ebbde7be6946e1ba17
https://github.com/mojodna/marblecutter-virtual#running-locally is probably the best way to get things running yourself (that's what I use for working on tiles.rdnt.io), as it's the most generic method to render tiles. If you need to do something more custom, have a look at the various Catalog
implementations.
Practically all of the rendering problems are issues with marblecutter, so that's likely the most sensible place to ask things.
Very similar too issue 8
I've created my own COG geotiff and have it stored on a publicly available s3 bucket link to geotiff
here is what the meta data looks like from /tiles
here is what gdalinfo gives me on my image
I'm not sure what is going on. when I tried it with my own lambda function I get a memory related error. Any thoughts to what is occurring?