amwolff / oa

Infrastructure to pull, retain and represent real-time data collected from Olsztyn public transportation vehicles

Home Page:https://autobusy.olsztyn.pl

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow parsing bus stops GPS coordinates into internal data types

amwolff opened this issue · comments

For the MVP, we would like to be able to parse published by the agency (ZDZiT) coordinates of the bus stops. After parsing into internal data type, we would like to throw them into the database (see #6). After that, other data service will be able to use this data (in this case: to show the stops on the map).

FTP with files: ftp://helios.zdzit.olsztyn.eu/
Latest for today: ftp://helios.zdzit.olsztyn.eu/gps_przystanki_zdzit_20180829.csv

The agency's internal data type for these files is the semicolon delimited CSV file (you can launch it in Excel to see what's going on).

  • Go has its internal CSV parsing library living at encoding/csv
  • We should allow to load these files either from remote or local location
  • Ideally the data should be parsed into an array of structs

I've created placeholder for the code at /pkg/feeds/zdzit/stops.go. I suggest to create a simple app at /cmd/dev/ to test written funcs. Feel free to ask anything.

EDIT: I've had split the issue into two.