You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In #107, @demiurg suggested some sort of catch for misaligned projections.
We can't compare spatial reference systems, that functionality doesn't currently exist: See #26 (comment).
We could compare spatial extents at a geometry level - add some logic that says "don't even bother reading the raster if the geometry extent doesn't overlap with the raster extent". It won't fix every case but it should catch some of them.
Some considerations:
no Exception should be raised - it's expected that some geometries may be off the map in normal usage.
we need to calculate the number of non-overlapping pixels since rasterstats supports counting nodata cells. I don't know of a reliable way to do this without a boundless read. If we can't figure this out, it's a deal breaker.
a warning should be issued: "Geometry does not overlap with raster, this may indicate a spatial referencing mismatch"
Ultimately I'm not too psyched on including guard rails for such cases. If you ask rasterstats to compare this geometry against that raster, it should do it. But if we can put in a simple optimization that doesn't break current usage I'll include it.
The text was updated successfully, but these errors were encountered:
In #107, @demiurg suggested some sort of catch for misaligned projections.
We can't compare spatial reference systems, that functionality doesn't currently exist: See #26 (comment).
We could compare spatial extents at a geometry level - add some logic that says "don't even bother reading the raster if the geometry extent doesn't overlap with the raster extent". It won't fix every case but it should catch some of them.
Some considerations:
Ultimately I'm not too psyched on including guard rails for such cases. If you ask
rasterstats
to compare this geometry against that raster, it should do it. But if we can put in a simple optimization that doesn't break current usage I'll include it.The text was updated successfully, but these errors were encountered: