Giter Club home page Giter Club logo

Comments (5)

DanielJDufour avatar DanielJDufour commented on August 20, 2024 1

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.

DanielJDufour avatar DanielJDufour commented on August 20, 2024

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.

DanielJDufour avatar DanielJDufour commented on August 20, 2024

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.

twelch avatar twelch commented on August 20, 2024

A week or two should be fine, thanks Daniel

from geoblaze.

twelch avatar twelch commented on August 20, 2024

Confirmed fixed in 2.5.0

from geoblaze.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.