forked from iTowns/itowns
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(CopcSource): use metadata.wkt to set source.crs
- Loading branch information
1 parent
1ecc6aa
commit 69ed2f4
Showing
2 changed files
with
47 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import assert from 'assert'; | ||
import { HttpsProxyAgent } from 'https-proxy-agent'; | ||
import CopcSource from 'Source/CopcSource'; | ||
|
||
const copcUrl = 'https://s3.amazonaws.com/hobu-lidar/autzen-classified.copc.laz'; | ||
|
||
describe('COPC', function () { | ||
let source; | ||
|
||
describe('Copc Source', function () { | ||
describe('retrieving crs from wkt information', function () { | ||
it('wkt.srs.type is COMPD_CS', function (done) { | ||
const networkOptions = process.env.HTTPS_PROXY ? { agent: new HttpsProxyAgent(process.env.HTTPS_PROXY) } : {}; | ||
source = new CopcSource({ | ||
url: copcUrl, | ||
networkOptions, | ||
}); | ||
source.whenReady | ||
.then((headers) => { | ||
assert.ok(headers.header.pointCount); | ||
assert.ok(headers.info.spacing); | ||
assert.ok(Array.isArray(headers.eb)); | ||
assert.equal(source.crs, 'NAD83 / Oregon GIC Lambert (ft)'); | ||
// when the proj4 PR will be merged we should change to : | ||
// assert.equal(source.crs, 'EPSG:2992'); | ||
done(); | ||
}).catch(done); | ||
}).timeout(5000); | ||
}); | ||
}); | ||
}); |