{"id":51070671,"url":"https://github.com/code-shoily/meridian","last_synced_at":"2026-06-23T10:01:42.301Z","repository":{"id":356782821,"uuid":"1234042152","full_name":"code-shoily/meridian","owner":"code-shoily","description":"geography + graph theory + elixir","archived":false,"fork":false,"pushed_at":"2026-06-14T04:15:43.000Z","size":128,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-14T06:19:37.621Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Elixir","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/code-shoily.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-09T17:14:09.000Z","updated_at":"2026-06-14T04:15:46.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/code-shoily/meridian","commit_stats":null,"previous_names":["code-shoily/meridian"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/code-shoily/meridian","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-shoily%2Fmeridian","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-shoily%2Fmeridian/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-shoily%2Fmeridian/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-shoily%2Fmeridian/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/code-shoily","download_url":"https://codeload.github.com/code-shoily/meridian/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-shoily%2Fmeridian/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34684686,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-23T02:00:07.161Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2026-06-23T10:01:41.414Z","updated_at":"2026-06-23T10:01:42.293Z","avatar_url":"https://github.com/code-shoily.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Meridian\n\n[![Hex Version](https://img.shields.io/hexpm/v/meridian.svg)](https://hex.pm/packages/meridian)\n[![Hex Docs](https://img.shields.io/badge/hex-docs-ffaff3)](https://hexdocs.pm/meridian/)\n[![CI](https://github.com/code-shoily/meridian/actions/workflows/ci.yml/badge.svg)](https://github.com/code-shoily/meridian/actions)\n[![Coverage Status](https://coveralls.io/repos/github/code-shoily/meridian/badge.svg?branch=main)](https://coveralls.io/github/code-shoily/meridian?branch=main)\n[![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n\n\u003e Projection-aware spatial graphs for Elixir.\n\nMeridian sits on top of [`yog_ex`](https://hex.pm/packages/yog_ex) and brings\ngeography into graph theory. Build graphs from maps, run spatial algorithms,\nand render your networks back onto the earth.\n\n## Installation\n\nAdd `meridian` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:meridian, \"~\u003e 0.1.0\"}\n  ]\nend\n```\n\n### Optional dependencies\n\nMeridian keeps its core lightweight. Heavy or native dependencies are optional:\n\n| Feature | Dependency | Add to `mix.exs` |\n|---------|-----------|------------------|\n| H3 hex grids | `:h3` | `{:h3, \"~\u003e 3.0\"}` |\n| Geohash grids | `:geohash` | `{:geohash, \"~\u003e 1.3\"}` |\n| GeoJSON I/O | `:jason` | `{:jason, \"~\u003e 1.4\"}` |\n| HTTP map APIs | `:req` | `{:req, \"~\u003e 0.5\"}` |\n\n## Quick Start\n\n### H3 hexagonal grid\n\n```elixir\ngraph =\n  Meridian.Graph.new(kind: :undirected)\n  |\u003e Meridian.Builder.H3.grid(center: {43.6453, -79.3806}, resolution: 9, k_ring: 2)\n\nMeridian.Graph.node_count(graph)\n#=\u003e 19\n```\n\n### Geohash grid\n\n```elixir\ngraph =\n  Meridian.Graph.new(kind: :undirected)\n  |\u003e Meridian.Builder.Geohash.grid(\n       sw: {43.6, -79.4},\n       ne: {43.7, -79.3},\n       precision: 5,\n       topology: :rook\n     )\n```\n\n### GeoJSON ingest\n\n```elixir\n{:ok, graph} =\n  \"roads.geojson\"\n  |\u003e File.read!()\n  |\u003e Meridian.IO.GeoJSON.from_string()\n```\n\n### Spatial shortest path\n\n```elixir\n{:ok, path} =\n  Meridian.Pathfinding.a_star(graph, from: :a, to: :b)\n\npath.nodes\n#=\u003e [:a, :intersection_3, :b]\npath.total_weight\n#=\u003e 1240.5\n```\n\n### Render back to GeoJSON\n\n```elixir\ngraph\n|\u003e Meridian.Render.GeoJSON.to_string()\n|\u003e File.write!(\"output.geojson\")\n```\n\n## Architecture\n\nMeridian wraps `Yog.Graph` in a `Meridian.Graph` struct that carries spatial\nmetadata:\n\n```elixir\n%Meridian.Graph{\n  graph: %Yog.Graph{},\n  crs: \"EPSG:4326\",\n  srid: 4326,\n  bounds: %Geo.Polygon{}\n}\n```\n\nThis means every coordinate in the graph lives in a known, declared coordinate\nreference system. Merging two graphs with different CRS values raises an\n`ArgumentError` — no silent coordinate confusion.\n\n## Modules\n\n| Module | Purpose |\n|--------|---------|\n| `Meridian.Graph` | Spatial graph struct, queries, and modifications |\n| `Meridian.CRS` | Earth-aware distances, edge-weight computation, bounding boxes |\n| `Meridian.Geometry` | CRS-agnostic geometric helpers (euclidean, centroid, contains?) |\n| `Meridian.Pathfinding` | Spatially-informed A*, Dijkstra, widest path |\n| `Meridian.Spatial` | Proximity queries: `within/3`, `nearest/3` |\n| `Meridian.Builder.H3` | Hexagonal grid graphs via Uber H3 |\n| `Meridian.Builder.Geohash` | Rectangular grid graphs via geohash |\n| `Meridian.IO.GeoJSON` | GeoJSON → graph ingestion |\n| `Meridian.Render.GeoJSON` | Graph → GeoJSON rendering |\n\n## Protocols\n\n`Meridian.Graph` implements `Enumerable` and `Inspect`:\n\n```elixir\ngraph = Meridian.Graph.new() |\u003e Meridian.Graph.add_node(1, %{name: \"A\"})\nEnum.to_list(graph)\n#=\u003e [{1, %{name: \"A\"}}]\n\ninspect(graph)\n#=\u003e \"#Meridian.Graph\u003cEPSG:4326, 1 node, 0 edges\u003e\"\n```\n\n## Relationship to `yog_ex`\n\n`yog_ex` provides the graph engine: Dijkstra, A*, Bellman-Ford, community\ndetection, connectivity, and every other graph algorithm you might need.\nMeridian adds the *spatial layer* on top: coordinate systems, map ingestion,\ngrid builders, and geographic heuristics.\n\nYou can drop down to raw `yog_ex` at any time:\n\n```elixir\nyog = Meridian.Graph.to_yog(graph)\nYog.Pathfinding.Dijkstra.shortest_path(yog, from: :a, to: :b)\n```\n\n## Roadmap\n\nSee [`ROADMAP.md`](./ROADMAP.md) for the full plan, priorities, and what's up for grabs.\n\nHighlights:\n- ✅ Spatial graph with CRS, GeoJSON I/O, H3/geohash builders\n- ✅ Spatial pathfinding — A*, Dijkstra, widest path\n- ✅ Livebook map rendering via MapLibre\n- ✅ OpenStreetMap ingestion (bounding box, raw JSON, and NIF-accelerated `.osm.pbf` parsing) (see [#1](https://github.com/code-shoily/meridian/issues/1))\n- ⏳ Network buffers, spatial indexing, real CRS reprojection\n\n## License\n\nMIT License — see [LICENSE](./LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode-shoily%2Fmeridian","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcode-shoily%2Fmeridian","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode-shoily%2Fmeridian/lists"}