ProductPromotion
Logo

Elixir

made by https://0x3d.site

GitHub - NAISorg/conrex: An Elixir implementation of the CONREC algorithm for topographic or isochrone maps.
An Elixir implementation of the CONREC algorithm for topographic or isochrone maps. - NAISorg/conrex
Visit Site

GitHub - NAISorg/conrex: An Elixir implementation of the CONREC algorithm for topographic or isochrone maps.

GitHub - NAISorg/conrex: An Elixir implementation of the CONREC algorithm for topographic or isochrone maps.

Conrex

Conrex logo

Example output visualization

The National Association of Independent Schools developed an Elixir implementation of the Paul Bourke's Conrec algorithm to calculate the drive-time to a particular location. The Conrex hex package is now available to developers here on GitHub.

Most 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.

Conrex uses a convergent isochrone to calculate real traffic and topographic conditions. An implementation of Paul Bourke's CONREC algorithm in Elixir, Conrex is now available to the open source community.

NAIS developed Conrex for its Market View app. 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.

Installation

Conrex can be installed by adding conrex to your list of dependencies in mix.exs:

def deps do
  [
    {:conrex, "~> 1.0.0"}
  ]
end

Usage

The main algorithm outlined by Bourke can be invoked with Conrex.conrec:

iex> Conrex.conrec(values, x_coords, y_coords, contour_levels)

where values is a 2D list of samples (heights, travel times, etc), x_coords and y_coords are lists of X and Y coordinates for the sample grid, and contour_levels is a list of values at which a contour should be calculated. Conrex.conrec outputs a list of line segments to match the classic algorithm.

If the X and Y values are GPS coordinates, you can use Conrex.contour_polygons to generate GeoJSON polygons for each contour level:

iex> Conrex.contour_polygons(values, x_coords, y_coords, contour_levels, reference_point)

The additional parameter, reference_point, is a point known to be within the contour polygon, but outside any polygon holes. When converting the line segments to GeoJSON %Geo.Polygon{}s, Conrex will discard exterior polygon rings, and correct the coordinate winding for the main ring and the polygon holes to conform to the GeoJSON spec.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Some of the tests will write output and sample data to a contour.js file, which can be used to visualize the test data and result. The visualization can be seen by viewing priv/static/index.html in a web browser.

Credits

Zack Michener & Stephanie Wilkinson

License

MIT

Articles
to learn more about the elixir concepts.

Resources
which are currently available to browse on.

mail [email protected] to add your project or resources here 🔥.

FAQ's
to know more about the topic.

mail [email protected] to add your project or resources here 🔥.

Queries
or most google FAQ's about Elixir.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory