@@ -30,11 +30,11 @@ import (
3030 "strconv"
3131 "strings"
3232
33+ pdoknlv3 "github.com/pdok/mapserver-operator/api/v3"
34+ smoothoperatormodel "github.com/pdok/smooth-operator/model"
3335 smoothoperatorutils "github.com/pdok/smooth-operator/pkg/util"
34- "sigs.k8s.io/controller-runtime/pkg/conversion"
3536
36- pdoknlv3 "github.com/pdok/mapserver-operator/api/v3"
37- sharedModel "github.com/pdok/smooth-operator/model"
37+ "sigs.k8s.io/controller-runtime/pkg/conversion"
3838)
3939
4040const ServiceMetatdataIdentifierAnnotation = "pdok.nl/wms-service-metadata-uuid"
@@ -60,7 +60,7 @@ func (src *WMS) ToV3(target *pdoknlv3.WMS) {
6060
6161 // Set LifeCycle if defined
6262 if src .Spec .Kubernetes .Lifecycle != nil && src .Spec .Kubernetes .Lifecycle .TTLInDays != nil {
63- dst .Spec .Lifecycle = & sharedModel .Lifecycle {
63+ dst .Spec .Lifecycle = & smoothoperatormodel .Lifecycle {
6464 TTLInDays : smoothoperatorutils .Pointer (int32 (* src .Spec .Kubernetes .Lifecycle .TTLInDays )),
6565 }
6666 }
@@ -151,7 +151,7 @@ func convertHealthCheckToV3(v2 *HealthCheck) *pdoknlv3.HealthCheckWMS {
151151 }
152152 case v2 .Boundingbox != nil :
153153 return & pdoknlv3.HealthCheckWMS {
154- Boundingbox : smoothoperatorutils .Pointer (sharedModel .ExtentToBBox (strings .ReplaceAll (* v2 .Boundingbox , "," , " " ))),
154+ Boundingbox : smoothoperatorutils .Pointer (smoothoperatormodel .ExtentToBBox (strings .ReplaceAll (* v2 .Boundingbox , "," , " " ))),
155155 }
156156 }
157157 }
@@ -247,8 +247,8 @@ func (dst *WMS) ConvertFrom(srcRaw conversion.Hub) error {
247247 if service .Extent == nil {
248248 service .Extent = l .Extent
249249 } else {
250- bbox := smoothoperatorutils .Pointer (sharedModel .ExtentToBBox (* service .Extent )).DeepCopy ()
251- bbox .Combine (sharedModel .ExtentToBBox (* l .Extent ))
250+ bbox := smoothoperatorutils .Pointer (smoothoperatormodel .ExtentToBBox (* service .Extent )).DeepCopy ()
251+ bbox .Combine (smoothoperatormodel .ExtentToBBox (* l .Extent ))
252252 service .Extent = smoothoperatorutils .Pointer (bbox .ToExtent ())
253253 }
254254 }
@@ -344,7 +344,7 @@ func (v2Service WMSService) MapLayersToV3() pdoknlv3.Layer {
344344 bboxStringList := strings .Split (* v2Service .Extent , " " )
345345 bbox := pdoknlv3.WMSBoundingBox {
346346 CRS : v2Service .DataEPSG ,
347- BBox : sharedModel .BBox {
347+ BBox : smoothoperatormodel .BBox {
348348 MinX : bboxStringList [0 ],
349349 MaxX : bboxStringList [2 ],
350350 MinY : bboxStringList [1 ],
@@ -421,12 +421,12 @@ func (v2Layer WMSLayer) MapToV3(v2Service WMSService) pdoknlv3.Layer {
421421 if v2Layer .Extent != nil {
422422 layer .BoundingBoxes = append (layer .BoundingBoxes , pdoknlv3.WMSBoundingBox {
423423 CRS : v2Service .DataEPSG ,
424- BBox : sharedModel .ExtentToBBox (* v2Layer .Extent ),
424+ BBox : smoothoperatormodel .ExtentToBBox (* v2Layer .Extent ),
425425 })
426426 } else if v2Service .Extent != nil {
427427 layer .BoundingBoxes = append (layer .BoundingBoxes , pdoknlv3.WMSBoundingBox {
428428 CRS : v2Service .DataEPSG ,
429- BBox : sharedModel .ExtentToBBox (* v2Service .Extent ),
429+ BBox : smoothoperatormodel .ExtentToBBox (* v2Service .Extent ),
430430 })
431431 }
432432
0 commit comments