Giter Club home page Giter Club logo

Comments (2)

ddohler avatar ddohler commented on May 28, 2024 1

Hi @DLParkin -- thanks for the writeup! I have used GCPs with Loam once and did something similar to what you have here: calling convert() to add the GCPs and then calling warp() to apply them. However, for that work we only used GCPs around the boundary of the image rather than within the bounds.

I see a few small differences between what we did and what you have here that might be worth trying if they're acceptable for your use case:

  • We used the -tps flag rather than -order.
  • -overwrite shouldn't be necessary; internally, Loam creates a brand new dataset for each stage in the processing, which is essentially the same thing as the -overwrite flag, so it should be superfluous (though if you get different results with -overwrite and without I would love to hear about it).

One question I also have is whether you've copied the command-line arguments as they're being passed to convert() and warp() into calls to gdal_translate and gdalwarp on the command line? That is the easiest way to double-check whether you're using GDAL correctly. Though it's best to use GDAL 2.4 if you can because Loam hasn't been updated to GDAL 3.0 yet (I'm working on it, but GDAL 3+ made major changes to the build system so it hasn't been a straightforward upgrade). If you've done this and it works, but in Loam it doesn't, then that's a key piece of the puzzle.

I hope that's enough info to help you diagnose -- please let me know what you find and whether there's anything else I can do to help!

One other note (not really related to any of the above) is that you can reduce the amount of indentation due to the promises by returning promises at each stage. You're already returning the promises so you should be able to pull the .then() calls up to the top level at each stage, like this:

ds.convert(stringifyGCP(gcpsArray))
          .then((dsGCP: any) => dsGCP.warp(warpArgs))
          .then((dsWarped: any) => Promise.all([...]))
          .then(...)
          etc.

from loam.

DLParkin avatar DLParkin commented on May 28, 2024

@ddohler you have no idea how excited I am, thankyou so much! The amount of time I have spent to....

Using -tps instantly fixed it and now works as expected.

Removing -overwrite works just fine

As for the promises yes it was sub par, originally I had it similar but had issues with the error which became messy so many thanks for pointing that out as always wanting to improve.

Onto the next step of trying to apply colors with webgl

You are my new hero, I can not thank you enough!

from loam.

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.