{"id":28089241,"url":"https://github.com/naisorg/conrex","last_synced_at":"2025-10-06T21:43:49.487Z","repository":{"id":56283891,"uuid":"309807486","full_name":"NAISorg/conrex","owner":"NAISorg","description":"An Elixir implementation of the CONREC algorithm for topographic or isochrone maps.","archived":false,"fork":false,"pushed_at":"2022-01-12T17:11:20.000Z","size":276,"stargazers_count":56,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-01T23:38:56.678Z","etag":null,"topics":["conrec","elixir","gis","isochrone-map","isochrones","map","topographic-maps","topography"],"latest_commit_sha":null,"homepage":"https://github.com/naisorg/conrex","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/NAISorg.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}},"created_at":"2020-11-03T21:08:23.000Z","updated_at":"2025-09-16T01:38:30.000Z","dependencies_parsed_at":"2022-08-15T16:00:44.835Z","dependency_job_id":null,"html_url":"https://github.com/NAISorg/conrex","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/NAISorg/conrex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NAISorg%2Fconrex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NAISorg%2Fconrex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NAISorg%2Fconrex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NAISorg%2Fconrex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NAISorg","download_url":"https://codeload.github.com/NAISorg/conrex/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NAISorg%2Fconrex/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278686634,"owners_count":26028325,"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","status":"online","status_checked_at":"2025-10-06T02:00:05.630Z","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":["conrec","elixir","gis","isochrone-map","isochrones","map","topographic-maps","topography"],"created_at":"2025-05-13T12:55:25.902Z","updated_at":"2025-10-06T21:43:49.454Z","avatar_url":"https://github.com/NAISorg.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Conrex\n\n![Conrex logo](https://github.com/NAISorg/conrex/raw/master/priv/static/logo.png)\n\n![Example output visualization](https://github.com/NAISorg/conrex/raw/master/priv/static/screenshot.png)\n\nThe[ National Association of Independent Schools](https://nais.org) developed an Elixir implementation of the [Paul Bourke's Conrec](http://paulbourke.net/papers/conrec/) algorithm to calculate the drive-time to a particular location. The [Conrex hex package](https://hex.pm/packages/conrex) is now available to developers [here on GitHub.](https://github.com/NAISorg/conrex)\n\nMost map-based apps calculate the distance from a central point outward. That’s helpful if you want to see how long it will take you to fly somewhere else, but not so helpful if you want to calculate how long it will take customers to drive through traffic to get to your location.\n\n[Conrex](https://github.com/NAISorg/conrex) uses a convergent isochrone to calculate real traffic and topographic conditions. An implementation of [Paul Bourke's CONREC algorithm in Elixir](http://paulbourke.net/papers/conrec/), [Conrex](https://github.com/NAISorg/conrex) is now available to the open source community.    \n\nNAIS developed Conrex for its [Market View app](https://marketview.nais.org). Market View helps schools find children are within a reasonable driving distance of the school. It can also be used to map bus routes, commute times, or to determine a new location for a business.\n\n\n## Installation\n\nConrex can be installed by adding `conrex` to your list of dependencies in\n`mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:conrex, \"~\u003e 1.0.0\"}\n  ]\nend\n```\n\n## Usage\n\nThe main algorithm outlined by Bourke can be invoked with `Conrex.conrec`:\n\n```\niex\u003e Conrex.conrec(values, x_coords, y_coords, contour_levels)\n```\n\nwhere `values` is a 2D list of samples (heights, travel times, etc), `x_coords`\nand `y_coords` are lists of X and Y coordinates for the sample grid, and\n`contour_levels` is a list of values at which a contour should be calculated.\n`Conrex.conrec` outputs a list of line segments to match the classic algorithm.\n\nIf the X and Y values are GPS coordinates, you can use `Conrex.contour_polygons`\nto generate GeoJSON polygons for each contour level:\n\n```\niex\u003e Conrex.contour_polygons(values, x_coords, y_coords, contour_levels, reference_point)\n```\n\nThe additional parameter, `reference_point`, is a point known to be within the\ncontour polygon, but outside any polygon holes. When converting the line\nsegments to GeoJSON `%Geo.Polygon{}`s, Conrex will discard exterior polygon\nrings, and correct the coordinate winding for the main ring and the polygon\nholes to conform to the [GeoJSON spec](https://tools.ietf.org/html/rfc7946#section-3.1.6).\n\n## Contributing\n\nPull requests are welcome. For major changes, please open an issue first to\ndiscuss what you would like to change.\n\nSome of the tests will write output and sample data to a `contour.js` file,\nwhich can be used to visualize the test data and result. The visualization can\nbe seen by viewing `priv/static/index.html` in a web browser.\n\n## Credits\n\n[Zack Michener](https://zjm.me/) \u0026 [Stephanie Wilkinson](https://github.com/stephaniewilkinson/)\n\n## License\n\n[MIT](https://choosealicense.com/licenses/mit/)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnaisorg%2Fconrex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnaisorg%2Fconrex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnaisorg%2Fconrex/lists"}