Skip to content

Commit

Permalink
Merge branch 'main' into st-from-as
Browse files Browse the repository at this point in the history
  • Loading branch information
ahawlitschek authored Jan 19, 2024
2 parents 6fb4dbb + 916f192 commit 0f75d84
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Added `as` parameter for `stFrom` function

### Fixed
- Fixed `ST_PROJECT` function not being migrated to the GeometryType enum.

## [1.4.0](https://github.com/clickbar/laravel-magellan/tree/1.4.0) - 2023-07-02

### Improved
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public static function distance3D($geometryA, $geometryB): MagellanNumericExpres
/**
* Implements algorithm for computing the Fréchet distance restricted to discrete points for both geometries, based on Computing Discrete Fréchet Distance. The Fréchet distance is a measure of similarity between curves that takes into account the location and ordering of the points along the curves. Therefore it is often better than the Hausdorff distance.
*
* @param float|Expression|\Closure|null $densityFrac When the optional densifyFrac is specified, this function performs a segment densification before computing the discrete Fréchet distance. The densifyFrac parameter sets the fraction by which to densify each segment. Each segment will be split into a number of equal-length subsegments, whose fraction of the total length is closest to the given fraction.
* @param float|Expression|\Closure|null $densityFrac When the optional densifyFrac is specified, this function performs a segment densification before computing the discrete Fréchet distance. The densifyFrac parameter sets the fraction by which to densify each segment. Each segment will be split into a number of equal-length subsegments, whose fraction of the total length is closest to the given fraction.
*
* @see https://postgis.net/docs/ST_FrechetDistance.html
*/
Expand All @@ -78,7 +78,7 @@ public static function distanceFrechet($geometryA, $geometryB, float|Expression|
/**
* Returns the Hausdorff distance between two geometries. The Hausdorff distance is a measure of how similar or dissimilar 2 geometries are.
*
* @param float|Expression|\Closure|null $densityFrac The densifyFrac parameter can be specified, to provide a more accurate answer by densifying segments before computing the discrete Hausdorff distance. Each segment is split into a number of equal-length subsegments whose fraction of the segment length is closest to the given fraction.
* @param float|Expression|\Closure|null $densityFrac The densifyFrac parameter can be specified, to provide a more accurate answer by densifying segments before computing the discrete Hausdorff distance. Each segment is split into a number of equal-length subsegments whose fraction of the segment length is closest to the given fraction.
*
* @see https://postgis.net/docs/ST_HausdorffDistance.html
*/
Expand Down Expand Up @@ -322,7 +322,7 @@ public static function angleFromLines($lineString1, $lineString2): MagellanNumer
public static function project($geography, float|Expression|\Closure $distance, $azimuth): MagellanGeometryExpression
{
// TODO: consider returning geometry/geography
return MagellanBaseExpression::geometry('ST_Project', [GeoParam::wrap($geography), $distance, $azimuth], 'geography');
return MagellanBaseExpression::geometry('ST_Project', [GeoParam::wrap($geography), $distance, $azimuth], GeometryType::Geography);
}

/**
Expand Down

0 comments on commit 0f75d84

Please sign in to comment.