Changelog
View Sourcev1.8.0 - 2025-09-13
Enhancements
- Added support for LineStringM structs. The bbox, centroid, extent, and length properties can be calculated.
v1.7.0 - 2025-09-02
Enhancements
- Added support for area calculation of PolygonZ structs. It only supports polygons where all the points are on the same plane.
- Added support for area, length, and perimeter calculation of the footprints of 3D structs.
- Added converters from 3D to 2D structs into the Utils module.
v1.6.1 - 2025-08-26
Enhancements
- Refactored list length checking in area and perimeter function to use pattern matching instead of guards. This will result in performance improvements for large lists as they will not have to be traversed by the length/1 function anymore.
- Changed typespec of private functions that return Geo structs so that SRIDs are always hinted as integer. This is purely a cosmetic improvement as typespecs do not impact the way the code compiles or runs, but it is better for readability.
v1.6.0 - 2025-07-20
Enhancements
- Added support for LineStringZ and LineStringZM bounding box calculations. Until now, these structs were not supported. Now they return a Geo.Polygon with the min and max z value in the properties dict. For more information, please refer to the documentation.
- Added support for PolygonZ except for area calculations. PolygonZ is supported for bounding box, centroid, extent, and perimeter calculations now. For more information, please refer to the documentation.
Bugfixes
- All calculations now handle Polygon and PolygonZ structs with holes in them correctly, meaning that the bounding box and the extent only take into account the outer ring, while the perimeter and area include the holes, too.
v1.5.0 - 2025-07-19
Enhancements
- Added support for polygons with holes in area and perimeter calculations. The areas of holes get subtracted from the area of the outer ring, while the perimeters of holes get added to the perimeter of the outer ring. Please refer to the documentation for more information.
v1.4.0 - 2025-06-22
Enhancements
- Added SRID transfer capability to calculations that return Geo structs. This involves the
bbox
andperimeter
functions. Please refer to the documentation for more information.
v1.3.0 - 2025-05-24
Enhancements
- Added the GeoMeasure.length function to calculate the length of linear geometries. It uses the
Perimeter
module under the hood, but thelength
name keeps the geometric correctness. - Added support for Geo.LineStringZ and Geo.LineStringZM structs except for GeoMeasure.bbox. This involves the
centroid
,extent
, andlength
functions. Please refer to the documentation for more information.
Bug fixes
v1.2.0 - 2025-04-07
Enhancements
- Added support for Geo.PointZ and Geo.PointZM structs. This involves the
bbox
,centroid
, anddistance
functions. Please refer to the documentation for more information.
v1.1.0 - 2025-03-30
Enhancements
- Added support for Geo.PointM struct. This involves the
bbox
,centroid
, anddistance
functions, as well as an extension to the tuple nil checking function for handling n-item tuples. Please refer to the documentation for more information.
v1.0.0 - 2025-03-29
Potentially breaking change: Removed implementations that returned nil
until now
This aligns with BEAM's "let it break" principle, raising a FunctionClauseError
at the earliest possible occasion, making error handling as transparent as possible.
Potentially breaking change: Renamed submodule functions to calculate
instead of lowercase submodule name
This enhances the uniformity and readability of the code, making sure that it is obvious, what does what.
Potentially breaking change: Input geometries with nil
in coordinates raise ArgumentError
This ensures that the package raises a uniform ArgumentError upon encountering nil
coordinates, making its behaviour more predictable.
Other changes:
- Reduced the number of iterations over the coordinate list in the centroid calculation for better performance
- Pulled together all documentation in the
GeoMeasure
module - Added support table to the README, removed submodule call examples
v0.0.1 - 2025-03-21
First publication of the package
Enhancements
- Created functions for the calculation of the supported properties (area, bounding box, centroid, distance, extent, perimeter) for the supported structs (Point, LineString, Polygon)
- Added convenience shortcuts from the main GeoMeasure module in the form of delegates to the specific modules containing the actual functions.