@@ -232,7 +232,7 @@ func MapWMSToCapabilitiesGeneratorInput(wms *pdoknlv3.WMS, ownerInfo *smoothoper
232232 KeywordList : & wms130.Keywords {Keyword : wms .Spec .Service .Keywords },
233233 OnlineResource : wms130.OnlineResource {Href : & hostBaseURL },
234234 ContactInformation : getContactInformation (ownerInfo ),
235- Fees : asPtr ("NONE" ),
235+ Fees : smoothoperatorutils . Pointer ("NONE" ),
236236 AccessConstraints : & wms .Spec .Service .AccessConstraints ,
237237 LayerLimit : nil ,
238238 MaxWidth : & maxWidth ,
@@ -338,7 +338,7 @@ func getDcpType(url string, fillPost bool) *wms130.DCPType {
338338 OnlineResource : wms130.OnlineResource {
339339 Xlink : nil ,
340340 Type : nil ,
341- Href : asPtr (url ),
341+ Href : smoothoperatorutils . Pointer (url ),
342342 },
343343 }
344344
@@ -364,9 +364,9 @@ func getLayers(wms *pdoknlv3.WMS, canonicalURL string) []wms130.Layer {
364364 referenceLayer := wms .Spec .Service .Layer
365365 title := referenceLayer .Title
366366 if title != nil {
367- title = asPtr (mapperutils .EscapeQuotes (* referenceLayer .Title ))
367+ title = smoothoperatorutils . Pointer (mapperutils .EscapeQuotes (* referenceLayer .Title ))
368368 } else {
369- title = asPtr ("" )
369+ title = smoothoperatorutils . Pointer ("" )
370370 }
371371
372372 defaultCrs := []wms130.CRS {{
@@ -508,11 +508,11 @@ func getLayers(wms *pdoknlv3.WMS, canonicalURL string) []wms130.Layer {
508508 }
509509
510510 topLayer := wms130.Layer {
511- Queryable : asPtr (1 ),
511+ Queryable : smoothoperatorutils . Pointer (1 ),
512512 Opaque : nil ,
513513 Name : nil ,
514514 Title : * title ,
515- Abstract : asPtr (mapperutils .EscapeQuotes (wms .Spec .Service .Abstract )),
515+ Abstract : smoothoperatorutils . Pointer (mapperutils .EscapeQuotes (wms .Spec .Service .Abstract )),
516516 KeywordList : & wms130.Keywords {Keyword : referenceLayer .Keywords },
517517 CRS : defaultCrs ,
518518 EXGeographicBoundingBox : & defaultBoundingBox ,
@@ -552,12 +552,12 @@ func getLayers(wms *pdoknlv3.WMS, canonicalURL string) []wms130.Layer {
552552
553553 if layer .DatasetMetadataURL != nil {
554554 metadataUrls = append (metadataUrls , & wms130.MetadataURL {
555- Type : asPtr ("TC211" ),
556- Format : asPtr ("text/plain" ),
555+ Type : smoothoperatorutils . Pointer ("TC211" ),
556+ Format : smoothoperatorutils . Pointer ("text/plain" ),
557557 OnlineResource : wms130.OnlineResource {
558558 Xlink : nil ,
559- Type : asPtr ("simple" ),
560- Href : asPtr ("https://www.nationaalgeoregister.nl/geonetwork/srv/dut/csw?service=CSW&version=2.0.2&request=GetRecordById&outputschema=http://www.isotc211.org/2005/gmd&elementsetname=full&id=" + layer .DatasetMetadataURL .CSW .MetadataIdentifier ),
559+ Type : smoothoperatorutils . Pointer ("simple" ),
560+ Href : smoothoperatorutils . Pointer ("https://www.nationaalgeoregister.nl/geonetwork/srv/dut/csw?service=CSW&version=2.0.2&request=GetRecordById&outputschema=http://www.isotc211.org/2005/gmd&elementsetname=full&id=" + layer .DatasetMetadataURL .CSW .MetadataIdentifier ),
561561 },
562562 })
563563 }
@@ -570,7 +570,7 @@ func getLayers(wms *pdoknlv3.WMS, canonicalURL string) []wms130.Layer {
570570 }
571571
572572 nestedLayer := wms130.Layer {
573- Queryable : asPtr (1 ),
573+ Queryable : smoothoperatorutils . Pointer (1 ),
574574 Opaque : nil ,
575575 Name : layer .Name ,
576576 Title : smoothoperatorutils .PointerVal (layer .Title , "" ),
@@ -604,8 +604,8 @@ func getLayers(wms *pdoknlv3.WMS, canonicalURL string) []wms130.Layer {
604604 Format : "image/png" ,
605605 OnlineResource : wms130.OnlineResource {
606606 Xlink : nil ,
607- Type : asPtr ("simple" ),
608- Href : asPtr (canonicalURL + "/legend/" + * layer .Name + "/" + style .Name + ".png" ),
607+ Type : smoothoperatorutils . Pointer ("simple" ),
608+ Href : smoothoperatorutils . Pointer (canonicalURL + "/legend/" + * layer .Name + "/" + style .Name + ".png" ),
609609 },
610610 },
611611 StyleSheetURL : nil ,
@@ -619,7 +619,3 @@ func getLayers(wms *pdoknlv3.WMS, canonicalURL string) []wms130.Layer {
619619 result = append (result , topLayer )
620620 return result
621621}
622-
623- func asPtr [T any ](value T ) * T {
624- return & value
625- }
0 commit comments