Win a copy of Serverless Applications with Node.js this week in the NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Ron McLeod
  • Tim Moores
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Vijitha Kumara

Reading location data points in from a .txt file to calculate distance between those and user locati  RSS feed

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to read some pre- saved location data points into my program which can then calculate the distance between a user - inputed location and these points to determine which point the user is closest to..  
My instructions are to create a .txt file so that each line in the file contains each point's lat and lon coordinates and a description.  I am confused as to how to assign this data to a GeoPoint(lat,lon,description), when each line in the file is read in a string..

39.7392, 104.9903, Denver
32.3199, 106.7637, Las Cruces
35.5281, 108.7426, Gallup
39.9526, 75.1652, Philadelphia
45.5155, 122.6793, Portland
41.8781, 87.6298, Chicago


 
What a show! What atmosphere! What fun! What a tiny ad!
global solutions you can do in your home or backyard
https://coderanch.com/t/708587/global-solutions-home-backyard
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!