Comments (11)
Interesting...
It seems like creating the coordinate transformation silently failed. It should be (but it's not yet) throwing an error in the CoordinateTransformation constructor if that happens.
https://github.com/naturalatlas/node-gdal/blob/master/src/gdal_coordinate_transformation.cpp#L60
I think the new CoordinateTransformation()
is failing due to something like this (link) where proj4.dll isn't found on Travis. I'll need to look into it more, but if you call gdal.verbose()
before maybe this error will show up?
ERROR 6: Unable to load PROJ.4 library (proj.dll), creation of OGRCoordinateTransformation failed.
from node-gdal.
This has got to be the issue... @brianreavis is looking into statically linking the proj4 library now.
from node-gdal.
I gave it a try by adding gdal.verbose();
before the line that is throwing the error, but nothing. Same output in Travis. Trying to figure out how to install proj.4 into Travis to see if that wipes the error.
from node-gdal.
Weird. Hold off a bit on that... we should be building proj.4 into node-gdal so that you shouldn't have to go out and install it.
from node-gdal.
That proj.4 error is showing up in travis here:
https://travis-ci.org/mapbox/mapnik-omnivore/builds/28452441#L9357
With the latest commits it will be a properly thrown error.
I was also able to reproduce the error by removing /usr/lib/libproj.so
from my system. Tonight we should have node-gdal modified so that it doesn't need to go out and look for that library.
from node-gdal.
@brandonreavis nice work - my sense is the same - that you'll need to both statically link libproj.a and define -DPROJ_STATIC
in the gyp files. After that you'll also need to set PROJ_LIB to point at projs' epsg files to support the +init=epsg:...
syntax.
from node-gdal.
Woot! Error averted in Travis with the new commit.
from node-gdal.
Noice!
@springmeyer I haven't set PROJ_LIB
to the folder containing the EPSG files yet. Do you have any thoughts on how we can make a test that fails before trying to set PROJ_LIB at runtime? The current coordinate transform tests are here, and they include some +init=epsg:
transforms (which seem to work, strangely).
from node-gdal.
Try setting PROJ_LIB to something bogus and they should fail. I presume they are passing for you because the default PROJ_LIB path is burned into the binaries when you build and nothing has moved. Another test would be to move your working directory to some different path and then run the tests again. If things still pass is may be because the proj files are actually getting picked up from /usr/local/share/proj/epsg of something.
from node-gdal.
I just did some investigating on the PROJ_LIB situation. The weird thing is: no matter what I try, I can't get the test to break (awesome, but not awesome). What I've tried:
- Uninstalled Proj.4 from my machine.
- Compiled with
-DPROJ_LIB=""
- Set the
PROJ_LIB
environment variable to something bogus.export PROJ_LIB=~ && node_modules/.bin/mocha test
- Modified
pj_open_lib
to always returnNULL
. - Ran the tests from another directory.
Am I missing something here? Is there something off about the +init=epsg:
transform test?
from node-gdal.
Closing this. We can re-open if we manage to repro it, but for now I'm going to assume it's a non-issue.
from node-gdal.
Related Issues (20)
- polygon intersection with another geometry
- Can't open MVT for write
- gdal.Driver.create's parameter: data_type which need Integer(number) , however , Constants (GDT) : gdal.GDT_* provide string HOT 4
- Using node-gdal in electron HOT 4
- This its under other libs and can't even compile because node-pre-gyp ERROR
- DGN driver
- Node.js 14 HOT 3
- converting
- Node 16 binaries on older OS (glibc version) HOT 3
- npm install not working HOT 2
- Change the AREA_OR_POINT value
- Multi process Read Error HOT 1
- Memory Usage Overflow
- Problem with Node 17
- npm install gdal --save errors on M1 mac HOT 3
- What versions of nodejs are supported?
- Example of resolving GPS lat/long to elevation from a WGS84 TIFF HOT 15
- Get altitude/elevation from GPS coordinates HOT 1
- Add support for node 18
- Is there any release for arm64?
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 node-gdal.