Comments (10)
Hi @vincentsarago!
Thanks for reporting this issue. Throughout the project I'm using the new ES module syntax (import
/export
), which can be easily translated to something more widely supported using babel. I've planned to do this anyhow but it simply dropped under the table, thanks for reminding me.
I'll include this in the next beta (doing this now, should just take a couple of minutes).
from geotiff.js.
Hi @vincentsarago,
I fixed the issue, by adding a new source using nodes http
API. Please upgrade to v1.0.0-beta.3, and you should be good to go.
Thanks for the beta-testing and sorry for the inconvenience!
from geotiff.js.
Thanks @constantinius 🙏
from geotiff.js.
v1.0.0-beta.2 is now out. Could you please re-install geotiffjs and try again? Thanks.
from geotiff.js.
Thanks
I have now another error :-(
npm install geotiff -g
/Users/vincentsarago/.nvm/versions/node/v6.10.3/lib
└─┬ [email protected]
├── [email protected]
└── [email protected]
(py4) ~ npm link geotiff
/Users/vincentsarago/node_modules/geotiff -> /Users/vincentsarago/.nvm/versions/node/v6.10.3/lib/node_modules/geotiff
(py4) ~ node
> const GeoTIFF = require('geotiff');
Error: Cannot find module 'babel-runtime/helpers/possibleConstructorReturn'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/Users/vincentsarago/.nvm/versions/node/v6.10.3/lib/node_modules/geotiff/dist/geotiff.js:8:35)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
[SOLVED]
fixed by doing npm install babel-runtime && npm link babel-runtime
from geotiff.js.
on a similar subject,
I'm hitting another error while trying to access a web hosted file.
> const GeoTIFF = require('geotiff');
undefined
> const GeoTIFF = require('geotiff');
> url = 'http://landsat-pds.s3.amazonaws.com/c1/L8/017/034/LC08_L1TP_017034_20180417_20180501_01_T1/LC08_L1TP_017034_20180417_20180501_01_T1_B1.TIF'
'http://landsat-pds.s3.amazonaws.com/c1/L8/017/034/LC08_L1TP_017034_20180417_20180501_01_T1/LC08_L1TP_017034_20180417_20180501_01_T1_B1.TIF'
> GeoTIFF.fromUrl(url).then(data => {a = data}).catch(err => {console.log(err)});
Promise {
<pending>,
domain:
Domain {
domain: null,
_events: { error: [Function: debugDomainError] },
_eventsCount: 1,
_maxListeners: undefined,
members: [] } }
> ReferenceError: XMLHttpRequest is not defined
seems that XMLHttpRequest
is a built-in object in web browsers while it doesn't exist in nodejs : http://zuga.net/articles/node-errors-referenceerror-xmlhttprequest-is-not-defined/
Don't really have a solution for this right now :-(
from geotiff.js.
Huh, that is an issue. I thought that the fetch
API was preferred. Okay, I'll see what I can do, hopefully, I'll be able to fix this today.
from geotiff.js.
Thanks @constantinius
from geotiff.js.
@vincentsarago, in the meantime, you could use this package
I think it adds a global fetch
method if not prevalent, which in turn should prevent the error you are seeing.
from geotiff.js.
Thanks @constantinius everything seems to work fine now :-)
from geotiff.js.
Related Issues (20)
- The exports `package.json` needs a new paint job HOT 3
- How do I use compression? HOT 3
- Typescript compilation error in BaseClient HOT 14
- Writing GeoTiffs HOT 3
- Reading files larger than 4gb? HOT 1
- image.readRasters() HOT 3
- Exceeds max_safe_integer. Precision may be lost. HOT 2
- Type error at build time HOT 1
- Abort signal should be extended to `getImage` when performing slice's fetch action
- Property 'headers' does not exist on type '{}'
- Pool workers lead to memory leak? HOT 3
- using geotiff.js with react-native HOT 6
- 请升级一下lerc依赖 HOT 2
- credentials option is ignored HOT 3
- idenify does not work on GeoTiff float (Digitales Höhenmodell Oberfläche NRW) HOT 2
- Generating a geotiff from an image and a list of ground control points.
- readRGB() does not always return an interleaved array HOT 2
- Support also CommonJS HOT 4
- BlockedSource: Duplicated HTTP range requests
- capturing world coordinates form the tiff imaegs using geotiff.js HOT 1
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 geotiff.js.