Skip to content
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

WMS mapalgebra layer’s rendering crashes for layer in other SRS than WebMercator #258

Closed
micpilon opened this issue May 11, 2020 · 6 comments
Assignees
Labels

Comments

@micpilon
Copy link

I am having issues related to serving mapalgebra computed layers such as hillshade, slope and aspect with a WMS when the source layer has a spatial reference system different than WebMercator.
Browser throws: Layer (hrdtm-hillshade) not found or CRS (EPSG:3857) not supported
Console throws: ERROR geotrellis.server.ogc.wms.WmsView - java.lang.RuntimeException: Tile is too small to get surface values. (1, 1)
Here's a more detailed stack trace
stacktrace

The source layer behind the mapalgebra computation (type = "rastersourceconf") does render correctly. Also, the WCS displays these mapalgebra layers correctly spatially in a GIS, which leads to think that this is mostly a rendering problem.

I can provide you with samples soon.

Thanks!

@pomadchin pomadchin added the bug label May 11, 2020
@pomadchin
Copy link
Member

Hi @micpilon! Thanks for catching that; the example would be very useful indeed

@pomadchin
Copy link
Member

A small update: the layer read is for some reason empty. There is a bug in GeoTrellisRasterSources that could stitch an empty query result into a large raster (see locationtech/geotrellis#3240) which caused a bit unreadble error messages.
In general it looks like the ingested layer is empty. Its metadata (bounds / extent / crs) can be incorrect.

@pomadchin
Copy link
Member

pomadchin commented May 14, 2020

It looks like the problem is in the zFactor set for the hillshade operation. Try to set it to smth like 9.166226027378224E-5 or 1.254307051800487E-4 for this dataset

@pomadchin
Copy link
Member

pomadchin commented May 21, 2020

The issue was that the histogram used the min cellSize available for the layer, and such cellSize could be too small to calculate the hillshade.

This PR #261 should fix it: it tries to select the still the minCellSize but it selects the layer that has enough of pixels to compute the histogram.

@micpilon
Copy link
Author

PR #261 indeed fixes the problem. Thanks @pomadchin !

@pomadchin
Copy link
Member

@micpilon thanks for reviewing it! closing!

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

No branches or pull requests

2 participants