@turf/helpers: Breaking change in 6.2.0 versus 6.1.4: coordinates must contain numbers
See original GitHub issue6.2.0
reintroduces proper null-checking for points. Invalid usage of point
throws errors where it had not in the past. If you found this issue by googling the error; double check that you’re passing in your coordinates as longitude
, latitude
– not latitude
, longitude
and check your usage carefully.
Error: coordinates must contain numbers
at point (/Users/jeff/repos/find-nearest-us-cities/node_modules/@turf/helpers/dist/js/index.js:177:15)
at /Users/jeff/repos/find-nearest-us-cities/index.js:17:25
at Array.map (<anonymous>)
at nearestCities (/Users/jeff/repos/find-nearest-us-cities/index.js:16:90)
at Test.<anonymous> (/Users/jeff/repos/find-nearest-us-cities/test.js:12:24)
at Test.bound [as _cb] (/Users/jeff/repos/find-nearest-us-cities/node_modules/tape/lib/test.js:90:32)
at Test.run (/Users/jeff/repos/find-nearest-us-cities/node_modules/tape/lib/test.js:107:31)
at Test.bound [as run] (/Users/jeff/repos/find-nearest-us-cities/node_modules/tape/lib/test.js:90:32)
at Test._end (/Users/jeff/repos/find-nearest-us-cities/node_modules/tape/lib/test.js:201:11)
at Test.bound [as _end] (/Users/jeff/repos/find-nearest-us-cities/node_modules/tape/lib/test.js:90:32)
Issue Analytics
- State:
- Created 3 years ago
- Comments:9
Top Results From Across the Web
@turf/helpers - npm
Start using @turf/helpers in your project by running `npm i ... coordinates Array<number> longitude, latitude position (each in decimal ...
Read more >Advanced geospatial analysis - Turf.js
Calculates the distance between two points in degrees, radians, miles, or kilometers. This uses the Haversine formula to account for global curvature.
Read more >@turf/point-on-feature | Yarn - Package Manager
Most Turf functions work with GeoJSON features. These are pieces of data that represent a collection of properties (ie: population, elevation, zipcode, etc.) ......
Read more >Receiving a 'coordinates must be an array of two or more ...
I have an array of coordinate arrays as shown in Turf.js (lineString) but I'm receiving this error: Uncaught Error: coordinates must be an ......
Read more >Solved: Cannot modify a property of a sealed object: turf
isNumber(r[1]))throw new Error("coordinates must contain numbers");return ... new Error("Each LinearRing of a Polygon must have 4 or more Positions.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@mfedderly: 🤦 Thank you so much, I’d love to buy you a beer/pizza.
geokdbush.around
already returns an ordered set. I changed the title of the ticket to help others out in the future. My correctness tests were passing and I conflated #1977 to mean that there was an issue with the check. Sorry that I filed this upstream too hastily; I thought my parameter checking and test coverage was sufficient.Oops, good call. The line numbers are for https://github.com/jmealo/find-nearest-us-cities/blob/master/index.js not test.js.