terraformer-js / terraformer

A geographic toolkit for dealing with geometry, geography, formats, and building geodatabases
MIT License
182 stars 28 forks source link

Extend coordinate checks to accommodate z-value of `0` #79

Closed LeviRemi closed 2 years ago

LeviRemi commented 2 years ago

Hey @jgravois, this is a small fix for #78 that introduces an additional check so that z-values are not only checked for falsy, but also if equivalent to zero.

If both checks fail, then it is certain that no z-values were included in the coordinates array.

I added a new test in the same format as previous tests, but this time verifying persistence of the 0 z-value. Let me know if this needs enhanced at all, or if more coverage is required.

npm run test is successful after implementing these changes.

jgravois commented 2 years ago

not a problem with your PR, but i think you can appease Travis by targeting explicit versions of Node.js.

https://github.com/terraformer-js/terraformer/blob/87bad73e455c820372a777abb11ce5d0468676fb/.travis.yml#L4-L6

node_js: 
   - 14
   - 16

if so, i'll figure out what's needed to get things ✅ in 18x separately.

LeviRemi commented 2 years ago

@jgravois That did the trick; Travis is pleased. Thanks for the tip!