Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix(st_project): Parameter not using the new enum #67

Merged
merged 1 commit into from
Jan 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

### 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
Loading