{"id":16485356,"url":"https://github.com/morganconrad/aids-to-navigation","last_synced_at":"2026-02-10T16:09:33.112Z","repository":{"id":71409750,"uuid":"453706004","full_name":"MorganConrad/aids-to-navigation","owner":"MorganConrad","description":"Get Canadian and US Aids to Navigation (buoys, lights, etc...)","archived":false,"fork":false,"pushed_at":"2022-02-21T16:50:19.000Z","size":2684,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-11T14:45:58.450Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MorganConrad.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-01-30T14:42:02.000Z","updated_at":"2022-02-03T01:40:08.000Z","dependencies_parsed_at":"2023-03-07T02:45:24.358Z","dependency_job_id":null,"html_url":"https://github.com/MorganConrad/aids-to-navigation","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MorganConrad%2Faids-to-navigation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MorganConrad%2Faids-to-navigation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MorganConrad%2Faids-to-navigation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MorganConrad%2Faids-to-navigation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MorganConrad","download_url":"https://codeload.github.com/MorganConrad/aids-to-navigation/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241261912,"owners_count":19936046,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T13:25:33.092Z","updated_at":"2026-02-10T16:09:33.080Z","avatar_url":"https://github.com/MorganConrad.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# aids-to-navigation\nCompile a JSON file of Canadian and US Aids to Marine Navigation (buoys, lights, etc...)\n\n## Usage\n```text\n aids-to-navigation --help            usage message\n aids-to-navigation [us | ca | all]   do USA, Canada, or both\n aids-to-navigation reg1 reg2...      do only certain regions (see below)\n```\n(You could also use `node CLI.js ...`)\n\n### Regions\n\n#### Canada\n```text\n ca -\u003e all of these\n newfoundland\n atl\n inland-waters\n pac\n```\n\n#### USA\n\n -[Details of Light Lists](https://navcen.uscg.gov/?pageName=lightListWeeklyUpdates)\n -[Map of US Regions](https://navcen.uscg.gov/images/map.jpg)\n\n```text\n us -\u003e all of these\n us1   District 1  (New England)\n us2   District 5  (Mid Atlantic)\n us3   District 7  (Southeast)\n us4   District 8  (Gulf of Mexico)\n us5   District 8  (Western)\n us6   District 11 (Southwest)\n us7   District 13 (Northwest)\n us8   District 14 (Hawaii)\n us9   District 17 (Alaska)\n us10  District 9  (Great Lakes)\n```\n\n## Implementation\n\n### Canada\n\nFirst, the HTML at https://www.notmar.gc.ca/list-lights is parsed to find all relevant HTML urls by region.  _e.g._ https://www.notmar.gc.ca/publications/list-lights/pac/p1-en\nParse that HTML (\"List of lights, Buoys and Fog Signals\") to get the data for the navigational aids\n\n### USA\n\nFor each region requested, get the XML from https://navcen.uscg.gov/?Do=weeklyLLCXML\u0026id=${region}\nParse the XML to get the data for the navigational aids\n\n### Data for each Navigational Aid\n\n - id: Identification Code, prefixed by \"CA_\" or \"US_\"\n - type: F, Fl, Oc, etc...  Fixed, Flashing, Occulting etc...\n  - a.k.a. \"Characteristic\", [Details here](https://en.wikipedia.org/wiki/Light_characteristic) [or here](https://www.ccg-gcc.gc.ca/publications/maritime-security-surete-maritime/aids-aides-navigation/page09-eng.html)\n - color: W white, R red, G green, Y yellow, Or Orange or Bu blue\n - period: the time in seconds needed for one complete cycle of changes\n - positionDMS: { lat, lon } in Degrees Minutes Seconds (a string)\n - lat: latitude in degrees\n - lon: longitude in degrees\n - height: height _in meters_\n - range: nominal range _in nautical miles_\n - description\n - remarks (US only)\n\n#### Example Data:\n\n```json\n{\n  \"id\": \"CA_1\",\n  \"name\": \"Two Mile Point\",\n  \"type\": \"Fl\",\n  \"color\": \"R\",\n  \"period\": \"4s\",\n  \"positionDMS\": {\n    \"lat\": \"49 31 14.1N\",\n    \"lon\": \"117 15 41.8W\"\n  },\n  \"lat\": 49.52058,\n  \"lon\": -117.26161,\n  \"height\": 9.4,\n  \"range\": 5,\n  \"description\": \"On 3-pile dolphin, red and white triangular daymark.\"\n}\n```\n\n## What might you do with this?\n\nThe data doesn't change often, so you needn't run this all that often.  On my 6 year old budget laptop it takes about 1 minute.\n\n`db/all.json` contains _all_ the navigational aids, as of 13 February 2022.\nOne thing you might do is use [json-server](https://github.com/typicode/json-server)\n\n 1. json-server --ro path/to/db/all.json\n 2. then `http://localhost:3000/aids/?lat_lte=-0.1` brings up 18 navigational aids that are south of the Equator.\n\n## TODOs\n\n 1. I haven't yet tried it yet with [json-graphql-server](https://github.com/marmelab/json-graphql-server/issues)\n 2. Some of the positions parse to `0 or NaN`, need to debug that.\n 3. Some of the description or remark fields contain `\\n` or other cruft.  (A lot of cruft is removed!)\n 4. Add a little more meta data to the results - a count, time elapsed, ???\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmorganconrad%2Faids-to-navigation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmorganconrad%2Faids-to-navigation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmorganconrad%2Faids-to-navigation/lists"}