kashif / node-geos

GEOS (Geometry Engine) bindings for Node.js
MIT License
57 stars 21 forks source link

Projection Tests are off slightly #1

Closed wavded closed 3 years ago

wavded commented 13 years ago

e.g.

AssertionError: "POINT (111319.4907932735659415 110579.9652218975970754)" == "POINT (111319.4907932735659415 110579.9652218968840316)"
    at Object.<anonymous> (/home/wavded/Projects/node-geos/test/test.js:128:8)
    at Module._compile (module.js:402:26)
    at Object..js (module.js:408:10)
    at Module.load (module.js:334:31)
    at Function._load (module.js:293:12)
    at Array.<anonymous> (module.js:421:10)
    at EventEmitter._tickCallback (node.js:126:26)
AssertionError: "LINESTRING (0.0000000000000000 0.0000000007081155, 111319.4907932735659415 110579.9652218975970754)" == "LINESTRING (0.0000000000000000 0.0000000007081155, 111319.4907932735659415 110579.9652218968840316)"
    at Object.<anonymous> (/home/wavded/Projects/node-geos/test/test.js:135:8)
    at Module._compile (module.js:402:26)
    at Object..js (module.js:408:10)
    at Module.load (module.js:334:31)
    at Function._load (module.js:293:12)
    at Array.<anonymous> (module.js:421:10)
    at EventEmitter._tickCallback (node.js:126:26)
wavded commented 13 years ago

BTW running: libproj 4.7.0-1

booo commented 13 years ago

As far as I know the computation depends on your system architecture. There should be a slight difference depending on the cpu you use.

This is just a pure test and not a bug. I'm working on better tests...

wavded commented 13 years ago

sounds good, thx!

strk commented 11 years ago

Just a note: you could use the WKTWriter to compare outputs. The class supports limiting the number of decimal digits.

kashif commented 11 years ago

ok going to create an issue for this... thanks!

strk commented 11 years ago

FYI: I've just added this project to http://trac.osgeo.org/geos/wiki/Applications