Comments (2)
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.
@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)
- Add OGR wrappers
- Switch to `try` / `finally` for wrapper cleanup
- Error in GDALOpen HOT 4
- Upgrade to Webpack 5 HOT 1
- Code playground
- Asset locations HOT 1
- Production builds don't utilize loam-worker.min.js
- Add `prepare` script that builds the library
- Remote COG support? HOT 3
- Further bundling cleanup
- Does this library support GDALGetRasterStatistics exposed in gdal-js ? HOT 5
- Support opening vector datasets with GDALOpenEx HOT 13
- SyntaxError: Unexpected token '<' HOT 4
- Packaging not including minified files correctly HOT 1
- loam.initialize throws Invalid base URL exception HOT 4
- GDALDataset.bytes() is not documented HOT 3
- Convert (gdal_translate) to mbtiles HOT 2
- How to rotate image? HOT 4
- Loam cannot be run under Node.js HOT 3
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 loam.