Skip to content

Instantly share code, notes, and snippets.

@chasset
Last active Feb 25, 2019
Embed
What would you like to do?
Test turfjs on the whole sphere
{"type":"FeatureCollection","features":[{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-88.98237619059147]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-88.08305582686693]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-87.18373546314238]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-86.28441509941784]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-85.3850947356933]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-84.48577437196876]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-83.58645400824422]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-82.68713364451968]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-81.78781328079513]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-80.8884929170706]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-79.98917255334605]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-79.08985218962151]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-78.19053182589697]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-77.29121146217243]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-76.39189109844789]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-75.49257073472334]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-74.5932503709988]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-73.69393000727426]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-72.79460964354972]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-71.89528927982518]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-70.99596891610064]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-70.0966485523761]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-69.19732818865155]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-68.29800782492701]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-67.39868746120247]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-66.49936709747793]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-65.60004673375339]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-64.70072637002885]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-63.80140600630431]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-62.90208564257978]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-62.00276527885524]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-61.10344491513071]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-60.204124551406174]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-59.30480418768164]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-58.405483823957105]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-57.50616346023257]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-56.60684309650804]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-55.7075227327835]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-54.80820236905897]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-53.90888200533443]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-53.0095616416099]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-52.110241277885365]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-51.21092091416083]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-50.311600550436296]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-49.41228018671176]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-48.51295982298723]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-47.61363945926269]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-46.71431909553816]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-45.814998731813624]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-44.91567836808909]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-44.016358004364555]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-43.11703764064002]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-42.21771727691549]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-41.31839691319095]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-40.41907654946642]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-39.51975618574188]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-38.62043582201735]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-37.721115458292815]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-36.82179509456828]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-35.922474730843746]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-35.02315436711921]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-34.12383400339468]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-33.22451363967014]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-32.32519327594561]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-31.42587291222107]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-30.526552548496532]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-29.627232184771994]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-28.727911821047456]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-27.82859145732292]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-26.92927109359838]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-26.029950729873843]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-25.130630366149305]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-24.231310002424767]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-23.33198963870023]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-22.43266927497569]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-21.533348911251153]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-20.634028547526615]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-19.734708183802077]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-18.83538782007754]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-17.936067456353]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-17.036747092628463]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-16.137426728903925]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-15.238106365179387]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-14.33878600145485]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-13.439465637730311]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-12.540145274005774]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-11.640824910281236]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-10.741504546556698]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-9.84218418283216]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-8.942863819107622]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-8.043543455383084]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-7.144223091658547]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-6.24490272793401]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-5.345582364209473]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-4.446262000484936]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-3.546941636760398]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-2.6476212730358606]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-1.748300909311323]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,-0.8489805455867857]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,0.05033981813775168]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,0.9496601818622891]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,1.8489805455868265]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,2.748300909311364]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,3.6476212730359014]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,4.5469416367604385]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,5.4462620004849756]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,6.345582364209513]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,7.24490272793405]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,8.144223091658587]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,9.043543455383125]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,9.942863819107663]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,10.8421841828322]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,11.741504546556738]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,12.640824910281276]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,13.540145274005814]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,14.439465637730352]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,15.33878600145489]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,16.238106365179426]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,17.137426728903964]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,18.036747092628502]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,18.93606745635304]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,19.835387820077578]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,20.734708183802116]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,21.634028547526654]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,22.533348911251192]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,23.43266927497573]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,24.331989638700268]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,25.231310002424806]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,26.130630366149344]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,27.02995072987388]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,27.92927109359842]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,28.828591457322958]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,29.727911821047496]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,30.627232184772033]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,31.52655254849657]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,32.42587291222111]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,33.325193275945644]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,34.22451363967018]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,35.12383400339471]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,36.02315436711925]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,36.92247473084378]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,37.821795094568316]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,38.72111545829285]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,39.620435822017384]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,40.51975618574192]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,41.41907654946645]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,42.31839691319099]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,43.21771727691552]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,44.117037640640056]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,45.01635800436459]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,45.915678368089125]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,46.81499873181366]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,47.714319095538194]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,48.61363945926273]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,49.51295982298726]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,50.4122801867118]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,51.31160055043633]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,52.210920914160866]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,53.1102412778854]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,54.009561641609935]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,54.90888200533447]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,55.808202369059]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,56.70752273278354]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,57.60684309650807]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,58.50616346023261]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,59.40548382395714]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,60.304804187681675]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,61.20412455140621]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,62.103444915130744]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,63.00276527885528]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,63.90208564257981]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,64.80140600630435]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,65.70072637002889]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,66.60004673375343]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,67.49936709747797]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,68.39868746120251]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,69.29800782492705]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,70.1973281886516]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,71.09664855237614]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,71.99596891610068]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,72.89528927982522]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,73.79460964354976]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,74.6939300072743]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,75.59325037099885]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,76.49257073472339]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,77.39189109844793]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,78.29121146217247]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,79.19053182589701]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,80.08985218962155]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,80.9891725533461]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,81.88849291707064]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,82.78781328079518]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,83.68713364451972]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,84.58645400824426]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,85.4857743719688]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,86.38509473569334]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,87.28441509941788]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,88.18373546314243]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,89.08305582686697]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0.5,89.98237619059151]}}]}
@chasset
Copy link
Author

chasset commented Feb 25, 2019

I try to get a grid of points on the whole sphere using http://turfjs.org/docs/#pointGrid.

This geoJSON is produced by :

turf.pointGrid([-179,-89,180,90], 1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment