simagyari

simagyari

GeoMeasure - calculate properties of Geo structs

Hi Everyone,

I’d like to share my first open-source package and my first Elixir project, GeoMeasure. It enables one to calculate properties, such as area, perimeter, bounding box, extent, etc. of different Geo geometries. It might be of interest to those in the geospatial domain, as it allows easy property calculations without having to worry about extracting coordinates from your Geo structs, and instead just passing the whole item as a parameter to the functions.
Currently, the project is in its infancy, as I have just published it to Hex. It supports calculations with Geo.Point, Geo.LineString and Geo.Polygon for now, but I plan on eventually supporting all available geometries in the Geo package.
Making this package is a great learning experience for me and I hope it can be useful some members of the community, too. Please feel free to ask any question, and make suggestions :slight_smile:

Hex: geomeasure | Hex
HexDocs: GeoMeasure — GeoMeasure v1.8.0

The GitHub repository is available at the link below:

https://github.com/simagyari/geomeasure

Most Liked

simagyari

simagyari

Hi Everyone,

Just a quick note that with the recently published v1.4.0, GeoMeasure enables the transfer of SRIDs from the input to the output in functions that return Geo structs. I think this is an important step for the usability of this package. With the current state of development, it can now function well for everyday tasks that require measuring the supported properties, with limitations explained in the readme of the package.

For future development angles, I am working on the support of Z values for more complex structs, which will be a larger piece of work, as it probably requires contributing to Geo with some PolygonZ and potentially PolygonZM implementations. I am also thinking about issues with handling coplanar and non-coplanar polygons for area calculations, which might be quite troublesome. Once I am happy with the single-geometry situation, I will move on to implementing the methods for multipart geometries, too.

For more information, feel free to check out the links I posted at the beginning of the thread.

mudasobwa

mudasobwa

Creator of Cure

One day, you might be interested to marry it to geolocation, so I’d just drop a link to a geoloc library here: LibLatLon v0.8.0 — Documentation

kip

kip

ex_cldr Core Team

A good addition to the ecosystem, thank you.

Does the library make any assumptions about whether the coordinates are {lat, lon} or {lon, lat}? Are different SRIDs supported?

olivermt

olivermt

The Geo lib takes care of that at least (I use it quite a bit).

simagyari

simagyari

Hi Everyone,

I have just published a new version (v1.0.0) of GeoMeasure, it contains some potentially breaking changes, which, I believe, significantly improve the integrity of the package. GeoMeasure can now handle nil values in input coordinates (throws ArgumentError), and it does not implement functions for geometries where the result does not exist (such as area of Geo.Point). It also encourages the use of the main module as the entry point, instead of the submodules. Overall, the documentation and the way to interface with the package are much clearer now. I hope you’ll find this an improvement in usability and I welcome any and all suggestions for future improvements and expansion.

Have fun using Elixir :slight_smile:

Where Next?

Popular in Announcing Top

zachdaniel
Hey folks! AshEvents Release We’ve just released the first version of AshEvents, an Event Sourcing tool for Ash Framework apps. Check o...
New
Schultzer
Hey there, I wrote this low-level library recently, its goal is simply to lower the barrier between Elixir and SQL, and it does that by p...
New
kip
ex_cldr provides localisation and internationalisation support based upon the data from the Unicode CLDR project. Unicode released CLDR ...
395 12072 119
New
simagyari
Hi Everyone, I’d like to share my first open-source package and my first Elixir project, GeoMeasure. It enables one to calculate propert...
New
fteschke
Announcing: playwright_ex A simple Elixir client for the Playwright node.js server. Automate browsers like Chromium, Firefox, Safari an...
New
munksgaard
flakify is an igniter installer that allows you to quickly get a Nix flake-based development shell up and running for your Elixir/Phoenix...
New
rbino
Hey folks! I’m happy to introduce TigerBeetlex, an Elixir client for TigerBeetle, the financial transactions database. I’ve been working...
New
brainlid
LangChain is short for Language Chain. An LLM, or Large Language Model, is the “Language” part. This library makes it easier for Elixir a...
New
rkallos
Peep is a new TelemetryMetrics reporter that supports both StatsD (and Dogstatsd) and Prometheus. While load testing a new Websocket-bas...
New
trisolaran
Hi! :waving_hand: I would like to present LiveSelect, a little library that I wrote to easily add a dynamic selection input to your LV f...
194 10054 106
New

Other popular topics Top

senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New
axelson
This post is a wiki (feel free to hit the edit button near the bottom right of this post to add your own changes!) This post collects co...
239 45766 226
New
malloryerik
Hi, this is for people who, like me, have had some friction using .html.heex templates in VSCode. The solution seems to be, in a hyphena...
New
vac
Hi, I'm quite new in Elixir and I'm trying to format a string to a PEM format. I have the certificate value like MIIDBTCCAe2...... and ...
New
fayddelight
I tried installing elixir 1.11.2 erlang 23.3.4 via asdf in my zsh shell. Enabled the versions locally and globally. When I list them ...
New
shahryarjb
Hello, I have map which I want to convert it to string like this: the map: %{last_name: "tavakkoli", name: "shahryar"} the string I ne...
New
johnnyicon
Hi all, I've just started learning Elixir and Phoenix Framework, so please pardon my n00bness at this stage. I'm trying to use Postg...
New
belgoros
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
aesmail
Hello guys, I have finally made it. I created an admin interface for a framework. It’s been on my todo list for years and with the curre...
New
magnetic
Hey :wave:t3: Elixir community, I’ve been learning Elixir, and working on some side projects. My editor of choice is VSCode, and althoug...
New

We're in Beta

About us Mission Statement