Skip to content

Commit

Permalink
Fix to make tests run on Jenkins. #279
Browse files Browse the repository at this point in the history
  • Loading branch information
EmileSonneveld committed Jun 28, 2024
1 parent 059eb58 commit 93c2b75
Show file tree
Hide file tree
Showing 5 changed files with 617 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1243,13 +1243,11 @@ class FileLayerProvider private(openSearch: OpenSearchClient, openSearchCollecti
* - if feature is in utm, target extent may be invalid in feature crs
* this is why we take intersection
*/
val commonCRS = targetExtent.crs
val targetExtentInCommonCRS = targetExtent.reproject(commonCRS)
val featureExtentInCommonCRS = feature.rasterExtent.get.reproject(feature.crs.get, commonCRS)
val featureExtentInTargetCRS = feature.rasterExtent.get.reproject(feature.crs.get, targetExtent.crs)

val intersection = featureExtentInCommonCRS.intersection(targetExtentInCommonCRS).map(_.buffer(1.0))
.getOrElse(featureExtentInCommonCRS)
val tmp = expandToCellSize(intersection.reproject(commonCRS, targetExtent.crs), theResolution)
val intersection = featureExtentInTargetCRS.intersection(targetExtent.extent).map(_.buffer(1.0))
.getOrElse(featureExtentInTargetCRS)
val tmp = expandToCellSize(intersection, theResolution)

val alignedToTargetExtent = re.createAlignedRasterExtent(tmp)
Some(alignedToTargetExtent.toGridType[Long])
Expand Down
Loading

0 comments on commit 93c2b75

Please sign in to comment.