Popularity
0.8
Declining
Activity
2.9
-
5
1
1
Monthly Downloads: 12,412
Programming language: Elixir
License: MIT License
Tags:
Geolocation
segseg alternatives and similar packages
Based on the "Geolocation" category.
Alternatively, view segseg alternatives based on common mentions on social networks and blogs.
-
topo
A Geometry library for Elixir that calculates spatial relationships between two geometries -
geoip
Elixir library to find geo location information given an IP address, hostname or Plug.Conn -
distance_api_matrix
Google Distance Matrix API Library for Elixir -
ipgeobase
Find Russian and Ukraine city by IP address and find country for other country Elixir -
srtm
Query locations for elevation data from the NASA Shuttle Radar Topography Mission
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
Promo
www.influxdata.com
Do you think we are missing an alternative of segseg or a related project?
Popular Comparisons
README
Segment-Segment Intersection for Elixir
Calculates intersection type and location for two line segments.
Installation
defp deps do
[{:seg_seg, "~> 0.1.0"}]
end
Usage
The SegSeg
module provides a function intersection
that calculates the
intersection between two line segments and returns a tuple with three elements:
- Boolean
true
if the two segments intersect at all,false
if they are disjoint - An atom representing the classification of the intersection:
:interior
- the segments intersect at a point that is interior to both:vertex
- the segments intersect at an endpoint of one or both segments:edge
- the segments are parallel, collinear, and overlap for some non-zero length:disjoint
- no intersection exists between the two segments
- A tuple
{x, y}
representing the point of intersection if the intersection is classified as:interior
or:vertex
, otherwisenil
.
Examples
SegSeg.intersection({2, -3}, {4, -1}, {2, -1}, {4, -3}) #=> {true, :interior, {3.0, -2.0}}
SegSeg.intersection({-1, 3}, {2, 4}, {-1, 4}, {-1, 5}) #=> {false, :disjoint, nil}
SegSeg.intersection({1, 2}, {3, 0}, {2, 1}, {4, 2}) #=> {true, :vertex, {2, 1}}
SegSeg.intersection({-1, 0}, {0, 2}, {1, 4}, {-1, 0}) #=> {true, :edge, nil}
Tests
> mix test