diff --git a/CHANGELOG.md b/CHANGELOG.md index e2fe11b..c3ff3d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/src/Database/PostgisFunctions/MagellanMeasurementFunctions.php b/src/Database/PostgisFunctions/MagellanMeasurementFunctions.php index 2b4af43..6daa953 100644 --- a/src/Database/PostgisFunctions/MagellanMeasurementFunctions.php +++ b/src/Database/PostgisFunctions/MagellanMeasurementFunctions.php @@ -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 */ @@ -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 */ @@ -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); } /**