Comments (5)
Got tests fixed on my local. Solution was to add a few more logical steps:
- filtering out geometries that don't cross the bounds of the raster (e.g., the right-hand geometry in the test case technically is just outside the bounds of the raster, so is filtered out)
- union/combine sampling areas expressed in pixel coordinates (avoiding double counting pixels)
- recompute bboxes of sampling areas in spatial reference system coordinates after previous step
Still will probably take a week or so to clean up and republish a new version of geoblaze. Just wanted to keep you up to date :-)
from geoblaze.
Hello. Appreciate you catching this. I can confirm the issue. The problem is here: https://github.com/GeoTIFF/geoblaze/blob/master/src/intersect-polygon/intersect-polygon.module.js#L54
Because geotiffs that cross the antimeridian generally use less than 1% of pixels in the overall extent, this triggers geoblaze to disaggregate the extent and sample around each sub-geometry. This is done to preserve memory.
There currently is no process for checking for overlap between sample areas because I have naively assumed the sub-geometries+samples would be far away from each other and not covering the same pixel.
Put simply, this wasn't a test case I had thought about and I'm very appreciative for you bringing this to my attention :-)
This can definitely be fixed by adding some union/de-confliction logic for sample areas, but may take a week or two.
Let me know if you need a fix on a quicker time table and I can push a patch that allows you to over-ride the fancy sub-sampling memory-safe logic.
from geoblaze.
technically got the union of some of the sub-geometry bboxes, but issue is that if the geometries are really small (not covering half a pixel), the size of the bbox will be 0-width or 0-height. I think we can get around the issue with this particular step by padding the snapping to the image space by 1 pixel on each side.
from geoblaze.
A week or two should be fine, thanks Daniel
from geoblaze.
Confirmed fixed in 2.5.0
from geoblaze.
Related Issues (20)
- add support for skewed images
- `rasterCalculator` with polygon clipping? HOT 3
- Remove worker_threads warning on initial import HOT 1
- add support for precise geometry expressed with numerical strings
- replace most logic in utils.getBoundingBox with bbox-fns/calc.js HOT 1
- Gnarly results that I can't explain HOT 3
- NaN values cause unexpected results
- improve isBbox
- Can't get stats within a geojson geometry HOT 2
- validate GeoJSON Input
- A multipolygon and 2 single polygons give differing results HOT 2
- Large error when raster extent and geometry bbox don't overlap HOT 4
- bbox per polygon HOT 1
- Improve accuracy of re-projected geometries HOT 1
- investigate multi-band performance HOT 9
- similarity
- area
- How i create a new georaster form array of pixel values (geoblaze.get)
- geoblaze.sum produces unexpected result in 2.7.0 HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from geoblaze.