developmentseed / developmentseed/deck.gl-raster

Support for GeoTIFFs with Ground Control Points (GCPs)

Open
#103 3 comments 0 reactions 0 assignees View on GitHub
cog
Dominant language
TypeScript
Stars
228
Forks
29
Avg merge
12h 27m
Merged PRs (30d)
4

Description

I've never worked with (or even seen, actually) a GeoTIFF with Ground Control Points, but I think it's important (eventually) to support them.

Let's split this into short-term and longer-term support

### Short-term support

We can assume that the positions defined by GCPs are the vertices of a mesh. In the short term we can use the **big simplifying assumption** that the geotransform is **linear** inside the bounds of any triangle.

We can then use a delaunay triangulation library to generate the starting conditions for our Delatin port. Although upstream Delatin's only public API generates the starting conditions for us (two triangles making up a rectangle), we can add an API that takes in a generic delaunay triangulation —and its mapping between uvs and known positions— and then sets up the initial conditions that Delatin expects.

The delaunay triangulation based on the actual GCPs ensures that any defined GCP is mapped to **exactly** that output space in deck.gl.

Then we can run our raster reprojector up to the given max error allowed by the user.

### Longer-term support

In the long run we'd ideally want to relax the assumption that a GeoTIFF defined by GCPs is internally linear.

I _think_ it may work if we first fit a non-linear model to the GCPs and then use _sampling of that non-linear model_ in the geotransform callbacks of the raster reprojector.

### References

There's a lot of existing work in allmaps that would be good to reference https://allmaps.org/docs/packages/project/

It's possible (ideal if) we'd be able to use `@allmaps/project` directly as a dependency here.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.