2

I am trying to get an array of latitude and longitudes so that I can test line making on an app. My issue though is finding lists (in form of array) of latitude and longitude. This is an example of what I am looking for:

[ [ 37.33523566, -122.03254863], [ 37.33521504, -122.03254905 ], [ 37.33519572, -122.0325498 ], [ 37.33517518, -122.03255055 ], [ 37.33515083, -122.03255349 ], [ 37.3351212, -122.03256229 ], [ 37.33507162, -122.0326037 ], [ 37.33503868, -122.03265072 ], [ 37.33500926, -122.03272188 ], [ 37.33497737, -122.03281282 ], [ 37.33494812, -122.0329212 ], [ 37.33492222, -122.03304215 ], [ 37.33489242, -122.03318372 ], [ 37.33485843, -122.03334424 ], [ 37.33482105, -122.03350886 ], [ 37.33477977, -122.03369603 ], [ 37.33474691, -122.03389325 ], [ 37.33470894, -122.03411085 ], [ 37.33467638, -122.03432425 ], [ 37.33464561, -122.03455442 ], [ 37.33461946, -122.03478727 ], [ 37.33460316, -122.0350347 ], [ 37.33458564, -122.03529395 ], [ 37.3345628, -122.03556217 ], [ 37.3345597, -122.03583308 ], [ 37.33454847, -122.03611286 ], [ 37.33454218, -122.03638578 ], [ 37.33454235, -122.03666775 ], [ 37.33453849, -122.03695223 ], [ 37.33453874, -122.03724626 ], [ 37.33453652, -122.03753997 ], [ 37.33452613, -122.03783266 ], [ 37.33451917, -122.03813827 ], [ 37.33451284, -122.03845141 ], [ 37.33450379, -122.03875937 ], [ 37.33449629, -122.03908048 ], [ 37.33448791, -122.03941089 ], [ 37.33447622, -122.0397398 ], [ 37.33447068, -122.04007348 ], [ 37.33446519, -122.04041597 ], [ 37.3344584, -122.04077831 ], [ 37.33445283, -122.04113765 ], [ 37.3344499, -122.04149924 ], [ 37.33444604, -122.04187567 ], [ 37.33444843, -122.04226334 ], [ 37.33444952, -122.04265083 ], [ 37.33445363, -122.04302852 ], [ 37.33445945, -122.04342255 ], [ 37.33446146, -122.04380955 ], [ 37.33445832, -122.04420408 ], [ 37.33445442, -122.04458579 ], [ 37.33444763, -122.04496063 ], [ 37.33444244, -122.045341 ], [ 37.33443657, -122.04571727 ], [ 37.33441708, -122.04607568 ], [ 37.3343947, -122.04644121 ], [ 37.33436235, -122.04681002 ], [ 37.33431797, -122.04716524 ], [ 37.33426985, -122.04751058 ], [ 37.33420971, -122.04784191 ], [ 37.33414287, -122.04818683 ], [ 37.33406324, -122.04853007 ], [ 37.33398776, -122.04886543 ], [ 37.33390604, -122.04921638 ], [ 37.3338288, -122.04956959 ], [ 37.33375445, -122.04992666 ], [ 37.33367998, -122.05028306 ], [ 37.33360693, -122.05063996 ], [ 37.33352458, -122.05100549 ], [ 37.33344889, -122.05137547 ], [ 37.33336511, -122.05174034 ], [ 37.33328787, -122.05209673 ], [ 37.33321101, -122.05246948 ], [ 37.33313411, -122.05283635 ], [ 37.33305632, -122.05318781 ], [ 37.33298105, -122.0535463 ], [ 37.33290406, -122.05391527 ], [ 37.33282486, -122.05427997 ], [ 37.33275353, -122.05462472 ], [ 37.33268517, -122.05498531 ], [ 37.33260475, -122.05535361 ], [ 37.33252881, -122.05571688 ], [ 37.33245639, -122.05608208 ], [ 37.33238246, -122.05644652 ], [ 37.33236209, -122.05682698 ], [ 37.33232211, -122.05719234 ], [ 37.33229772, -122.05757204 ], [ 37.332289, -122.05795133 ], [ 37.33228724, -122.05833354 ], [ 37.33230505, -122.05871525 ], [ 37.33233606, -122.05909629 ], [ 37.33238246, -122.0594718 ], [ 37.33244004, -122.05984991 ], [ 37.33251376, -122.06021989 ], [ 37.33260198, -122.06059221 ], [ 37.33270432, -122.06095339 ], [ 37.33282574, -122.06131389 ], [ 37.3329513, -122.06167465 ], [ 37.33307736, -122.06203541 ], [ 37.33320782, -122.06239181 ], [ 37.33333498, -122.06274686 ], [ 37.33346293, -122.06310662 ], [ 37.33358639, -122.06346075 ], [ 37.33370957, -122.06381723 ], [ 37.33383844, -122.06417204 ], [ 37.33395407, -122.06452986 ], [ 37.33405917, -122.06489607 ], [ 37.33414928, -122.06526437 ], [ 37.33422447, -122.06562781 ], [ 37.33429383, -122.06600055 ], [ 37.33435409, -122.06636961 ], [ 37.33440019, -122.06674461 ], [ 37.33442928, -122.06711736 ], [ 37.3344465, -122.06749672 ], [ 37.3344543, -122.06787986 ], [ 37.33444654, -122.06826065 ], [ 37.33442613, -122.06864035 ], [ 37.33439537, -122.06901468 ], [ 37.33435661, -122.06939204 ], [ 37.33430397, -122.06976336 ], [ 37.33424182, -122.07013275 ], [ 37.33417438, -122.07050306 ], [ 37.33410968, -122.07087404 ], [ 37.33403923, -122.07123245 ], [ 37.33396475, -122.07160897 ], [ 37.33389384, -122.07197743 ], [ 37.33382775, -122.07235512 ], [ 37.33375801, -122.07272963 ], [ 37.33369775, -122.07309474 ], [ 37.33363907, -122.07346522 ], [ 37.33359159, -122.07381886 ], [ 37.33355651, -122.07417592 ], [ 37.33353728, -122.07453283 ], [ 37.33353065, -122.07488445 ], [ 37.33353363, -122.07523112 ], [ 37.33355228, -122.07558936 ], [ 37.33358308, -122.07595104 ], [ 37.33362663, -122.0763056 ], [ 37.33368006, -122.07665613 ], [ 37.33374934, -122.07700482 ], [ 37.33382825, -122.07735141 ], [ 37.33392322, -122.07769942 ], [ 37.33402871, -122.07804543 ], [ 37.33415037, -122.07838406 ], [ 37.3342805, -122.07872034 ], [ 37.33442102, -122.07904631 ], [ 37.33457244, -122.0793639 ], [ 37.33473735, -122.0796747 ], [ 37.33492184, -122.07997503 ], [ 37.33511119, -122.08026077 ], [ 37.33531428, -122.08054952 ], [ 37.33552177, -122.08082252 ], [ 37.33573891, -122.08110667 ], [ 37.33595575, -122.08138403 ], [ 37.33617167, -122.08165962 ], [ 37.33638536, -122.08193111 ], [ 37.33659906, -122.08220411 ], [ 37.33680278, -122.08247812 ], [ 37.3370055, -122.0827595 ], [ 37.33720302, -122.08304213 ], [ 37.3373963, -122.08332863 ], [ 37.33758129, -122.08362627 ], [ 37.33775509, -122.08392617 ], [ 37.33793145, -122.0842275 ], [ 37.33810893, -122.08454124 ], [ 37.3382842, -122.08484542 ], [ 37.3384549, -122.08515152 ], [ 37.33862249, -122.08545696 ], [ 37.33879885, -122.08577472 ], [ 37.3389669, -122.08608946 ], [ 37.33913576, -122.08640269 ], [ 37.33930008, -122.08670293 ], [ 37.33947623, -122.08701088 ], [ 37.3396502, -122.08732093 ], [ 37.33981846, -122.08762326 ], [ 37.33998434, -122.08792937 ], [ 37.3401493, -122.08824042 ], [ 37.34031484, -122.08856086 ], [ 37.34046597, -122.08886286 ], [ 37.34061718, -122.08917878 ], [ 37.34077165, -122.08949679 ], [ 37.34092739, -122.08983097 ], [ 37.34107194, -122.09015057 ], [ 37.34121879, -122.09045668 ], [ 37.34137909, -122.09077234 ], [ 37.34154237, -122.09108423 ], [ 37.34171403, -122.09138934 ], [ 37.3418947, -122.091676 ], [ 37.34208941, -122.09195687 ], [ 37.34229154, -122.092223 ], [ 37.3424959, -122.09246482 ], [ 37.342708, -122.092712 ], [ 37.34291352, -122.09295692 ], [ 37.34312416, -122.09320284 ], [ 37.34332805, -122.09343444 ], [ 37.34353735, -122.09368045 ], [ 37.34374576, -122.09392 ], [ 37.34394974, -122.09415478 ], [ 37.34415677, -122.09439031 ], [ 37.34434595, -122.09463741 ], [ 37.34453978, -122.09489641 ], [ 37.34472464, -122.09516438 ], [ 37.3448932, -122.0954383 ], [ 37.34505141, -122.09572596 ], [ 37.34520782, -122.0960117 ], [ 37.34534964, -122.09631924 ], [ 37.34548953, -122.096638 ], [ 37.34562364, -122.09695274 ], [ 37.34576798, -122.09727888 ], [ 37.34590884, -122.09760787 ], [ 37.34604924, -122.0979434 ], [ 37.34619047, -122.09828781 ], [ 37.34633112, -122.09862728 ], [ 37.3464786, -122.09896549 ], [ 37.3466164, -122.09929791 ], [ 37.34676434, -122.09963352 ], [ 37.34690805, -122.09997509 ], [ 37.34705171, -122.10032243 ], [ 37.34719244, -122.1006624 ], [ 37.34733473, -122.10099349 ], [ 37.34747663, -122.10131879 ], [ 37.34762491, -122.1016513 ], [ 37.34777737, -122.10196336 ], [ 37.34794036, -122.10227399 ], [ 37.34812405, -122.10257499 ], [ 37.34831482, -122.10286198 ], [ 37.34851318, -122.10314001 ], [ 37.34872189, -122.10340186 ], [ 37.34894824, -122.1036539 ], [ 37.34918436, -122.10389589 ], [ 37.34941931, -122.10411164 ], [ 37.34966435, -122.10431859 ], [ 37.34991623, -122.10451573 ], [ 37.35016915, -122.1047086 ], [ 37.35042203, -122.10490214 ], [ 37.3506804, -122.10509685 ], [ 37.3509353, -122.10529449 ], [ 37.35119518, -122.1054944 ], [ 37.35145376, -122.10569934 ], [ 37.35170078, -122.10589849 ], [ 37.35194528, -122.10610938 ], [ 37.35218349, -122.10633762 ], [ 37.35240938, -122.10656821 ], [ 37.35262907, -122.10682025 ], [ 37.35283833, -122.10707414 ], [ 37.35304318, -122.1073468 ], [ 37.35322775, -122.10761167 ], [ 37.35340125, -122.10789012 ], [ 37.35357644, -122.10818206 ], [ 37.35373217, -122.10847987 ], [ 37.35388229, -122.10878137 ], [ 37.35402763, -122.10909116 ], [ 37.35416275, -122.10941512 ], [ 37.354285, -122.10973833 ], [ 37.35439853, -122.1100721 ], [ 37.35450989, -122.11040469 ], [ 37.35460422, -122.11074625 ], [ 37.35470108, -122.11109678 ], [ 37.35478615, -122.11144128 ], [ 37.35486926, -122.11178469 ], [ 37.3549592, -122.11213723 ], [ 37.35504792, -122.11248818 ], [ 37.35513836, -122.11282957 ], [ 37.35522226, -122.11317885 ], [ 37.35532071, -122.11352779 ], [ 37.35543424, -122.11386968 ], [ 37.35555758, -122.11420421 ], [ 37.35568444, -122.11452423 ], [ 37.35583234, -122.11484701 ], [ 37.35598347, -122.11516142 ], [ 37.35614335, -122.11546778 ], [ 37.35630592, -122.11577145 ], [ 37.35647419, -122.11607907 ], [ 37.35667204, -122.11636489 ], [ 37.35687073, -122.11663286 ], [ 37.35707534, -122.11689874 ], [ 37.35728082, -122.11715581 ], [ 37.3575003, -122.11741087 ], [ 37.35772158, -122.11764607 ], [ 37.35796495, -122.11787221 ], [ 37.35821377, -122.11808519 ], [ 37.35846644, -122.11829223 ], [ 37.35872263, -122.11848501 ], [ 37.3589945, -122.11866179 ], [ 37.35928216, -122.11883998 ], [ 37.35955814, -122.11901575 ], [ 37.35983897, -122.11918616 ], [ 37.36011952, -122.1193553 ], [ 37.36040727, -122.11952001 ], [ 37.36069305, -122.11969553 ], [ 37.3609743, -122.11986677 ], [ 37.36126096, -122.12003751 ], [ 37.36154377, -122.1202173 ], [ 37.36181958, -122.1204183 ], [ 37.36207862, -122.12062282 ], [ 37.36233305, -122.12084385 ], [ 37.36258266, -122.12108055 ], [ 37.36281941, -122.12133444 ], [ 37.36303768, -122.12160442 ], [ 37.36324345, -122.12188572 ], [ 37.36344328, -122.12218294 ], [ 37.36362588, -122.12248745 ], [ 37.36380169, -122.12279364 ], [ 37.36396061, -122.12310285 ], [ 37.36410876, -122.12341793 ], [ 37.36424153, -122.12374717 ], [ 37.36436332, -122.12407817 ], [ 37.36447237, -122.12441747 ], [ 37.36457081, -122.12476867 ], [ 37.36465673, -122.12512859 ], [ 37.36472923, -122.12549681 ], [ 37.3647884, -122.12586327 ], [ 37.36483488, -122.12623861 ], [ 37.36486694, -122.12661646 ], [ 37.36488463, -122.12699926 ], [ 37.36489573, -122.12737863 ], [ 37.36489494, -122.12775531 ], [ 37.36489561, -122.12814457 ], [ 37.36489536, -122.12851823 ], [ 37.36490102, -122.12889651 ], [ 37.364913, -122.12927755 ], [ 37.36492641, -122.12966111 ], [ 37.36495642, -122.13002966 ], [ 37.36500231, -122.13039762 ], [ 37.36505801, -122.13076299 ], [ 37.36513495, -122.13112023 ], [ 37.36522619, -122.13147671 ], [ 37.36533088, -122.13182204 ], [ 37.36543834, -122.13217241 ], [ 37.36554852, -122.13253006 ], [ 37.36565505, -122.13287858 ], [ 37.36576171, -122.13322476 ], [ 37.3658664, -122.13358057 ], [ 37.36597474, -122.1339342 ], [ 37.36607239, -122.13427694 ], [ 37.36617599, -122.13462026 ], [ 37.36627984, -122.13496408 ], [ 37.36637342, -122.13530514 ], [ 37.3664761, -122.13564763 ], [ 37.36657341, -122.13598643 ], [ 37.36667454, -122.13633075 ], [ 37.3667825, -122.13667173 ], [ 37.3668918, -122.13700784 ], [ 37.36700588, -122.13734664 ], [ 37.36714083, -122.13768569 ], [ 37.36728357, -122.13801602 ], [ 37.36743034, -122.13834434 ], [ 37.36759001, -122.13866201 ], [ 37.36776176, -122.13898061 ], [ 37.36794754, -122.13929619 ], [ 37.36813371, -122.13959391 ], [ 37.36833646, -122.13988803 ], [ 37.36854278, -122.1401674 ], [ 37.36876231, -122.14043713 ], [ 37.36898397, -122.14069152 ], [ 37.36921459, -122.14094005 ], [ 37.36945654, -122.1411796 ], [ 37.3697059, -122.14141823 ], [ 37.36994839, -122.1416339 ], [ 37.37019243, -122.14186189 ], [ 37.37043777, -122.14209172 ], [ 37.37068524, -122.14231367 ], [ 37.37092857, -122.14253931 ], [ 37.37117332, -122.14276269 ], [ 37.37142067, -122.14297886 ], [ 37.37167049, -122.14320232 ], [ 37.37190954, -122.14341883 ], [ 37.37215601, -122.14364204 ], [ 37.37240005, -122.14386038 ], [ 37.37263743, -122.14409064 ], [ 37.37287229, -122.14430781 ], [ 37.37311268, -122.14451887 ], [ 37.37336271, -122.14472699 ], [ 37.37361371, -122.14495984 ], [ 37.37385134, -122.14517802 ], [ 37.37409077, -122.14540877 ], [ 37.37433481, -122.14563986 ], [ 37.37457281, -122.14588663 ], [ 37.37481249, -122.14611939 ], [ 37.37503792, -122.14636347 ], [ 37.37527039, -122.14662055 ], [ 37.37550207, -122.14687494 ], [ 37.37572427, -122.14713511 ], [ 37.37595557, -122.14739872 ], [ 37.37618545, -122.14766024 ], [ 37.37641444, -122.14792309 ], [ 37.37664016, -122.14817958 ], [ 37.37686895, -122.14843858 ], [ 37.37709618, -122.14869624 ], [ 37.37732484, -122.14894979 ], [ 37.37755308, -122.14919429 ], [ 37.37778312, -122.14944148 ], [ 37.3780272, -122.14968145 ], [ 37.37828075, -122.14990349 ], [ 37.37854172, -122.15010976 ], [ 37.3787954, -122.15030297 ], [ 37.37906991, -122.15049139 ], [ 37.37933964, -122.15066314 ], [ 37.37961188, -122.15082139 ], [ 37.37989138, -122.15096748 ], [ 37.38018479, -122.15110721 ], [ 37.38048092, -122.15123277 ], [ 37.38078049, -122.15133956 ], [ 37.38107985, -122.15143117 ], [ 37.38139635, -122.15151398 ], [ 37.38170908, -122.15158724 ], [ 37.38201841, -122.1516569 ], [ 37.38232167, -122.15171758 ], [ 37.3826398, -122.15178036 ], [ 37.38294604, -122.15184264 ], [ 37.38325235, -122.15190458 ], [ 37.38355637, -122.15196543 ], [ 37.38386583, -122.15203945 ], [ 37.38417047, -122.1521117 ], [ 37.38447544, -122.1522008 ], [ 37.3847595, -122.15231454 ], [ 37.38505698, -122.15241395 ], [ 37.3853594, -122.15250213 ], [ 37.38560981, -122.15272559 ], [ 37.38587685, -122.15289608 ], [ 37.38612831, -122.15307537 ], [ 37.386369, -122.15330226 ], [ 37.38660109, -122.15352321 ], [ 37.38681491, -122.15376042 ], [ 37.38703695, -122.15399578 ], [ 37.38723661, -122.15426073 ], [ 37.38741594, -122.15453155 ], [ 37.38758433, -122.15481075 ], [ 37.38774539, -122.15510789 ], [ 37.38789928, -122.15540746 ], [ 37.38803876, -122.15572505 ], [ 37.38816025, -122.156047 ], [ 37.38827425, -122.1563775 ], [ 37.38837114, -122.1567204 ], [ 37.38845823, -122.15706146 ], [ 37.38852302, -122.15740629 ], [ 37.38858496, -122.15776739 ], [ 37.38863873, -122.158132 ], [ 37.38869141, -122.15849049 ], [ 37.38875059, -122.15884924 ], [ 37.38880101, -122.1592167 ], [ 37.38885423, -122.15958014 ], [ 37.38890729, -122.15994434 ], [ 37.38896215, -122.16030945 ], [ 37.38901726, -122.16067063 ] ]

I have tried using onthegomap.com but they export only in GPX and I have been unable to convert it to something like above.

Are there any databases for this or any websites that may facilitate this?

  • 1
    (if I understood correctly,) any geojson will be close enough to the format you are looking for. For example: raw.githubusercontent.com/datasets/geo-countries/master/data/… – philshem Sep 17 at 18:43
  • this is the correct anwser @philshem thank you! – Kev Wats Sep 18 at 0:23
  • It's overkill, but the Overpass API will give you this: https://lz4.overpass-api.de/api/interpreter?data=[out:json];(node(35.10193405724606,-106.58935546875,35.11990857099681,-106.5673828125);<;);out; -- you still have to dig a bit, but this is JSON format. – Barry Carter Sep 18 at 17:36
2

(From comment)

(if I understood correctly,) any geojson will be close enough to the format you are looking for. For example:

https://raw.githubusercontent.com/datasets/geo-countries/master/data/countries.geojson

1

I'm not sure where you are but for the UK you can download postcode to lat/long tables from a variety of sources.

UK postcodes to lat/long - this site also has a variety of other countries.

You then seem to be asking how to convert a csv into a list. Obviously for an app you don't want to have to load the csv every time as its a fairly expensive operation so you want to run it once and remember the result. This is an app programming question, however, rather than a question of where to source data.

  • Yes I asked on their as well – Kev Wats Sep 16 at 15:41
  • 1
    I'm not sure where your problem lies - you've got the csv and you've got a method to import a csv as an array. Which part of this are you struggling with? – Lio Elbammalf Sep 17 at 11:09
  • im sorry i meant originally GPX, my apologies for that file type mistake. – Kev Wats Sep 17 at 23:26
  • Okay but have you attempted downloading it as a csv? – Lio Elbammalf Sep 18 at 8:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.