@@ -76,6 +76,8 @@ func getColumns(data pdoknlv3.Data) []Column {
7676 for _ , column := range * data .GetColumns () {
7777 columns = append (columns , Column {Name : column .Name , Alias : column .Alias })
7878 }
79+ } else {
80+ return nil
7981 }
8082 return columns
8183}
@@ -172,6 +174,20 @@ func MapWMSToMapfileGeneratorInput(wms *pdoknlv3.WMS, ownerInfo *smoothoperatorv
172174 layer := getWMSLayer (serviceLayer , extent , wms )
173175 result .Layers = append (result .Layers , layer )
174176 }
177+
178+ for _ , serviceLayer := range allLayers {
179+ if serviceLayer .IsGroupLayer () && serviceLayer .Visible != nil && * serviceLayer .Visible {
180+ groupLayer := GroupLayer {
181+ Name : serviceLayer .Name ,
182+ Title : smoothoperatorutils .PointerVal (serviceLayer .Title , "" ),
183+ Abstract : smoothoperatorutils .PointerVal (serviceLayer .Abstract , "" ),
184+ StyleName : "" ,
185+ StyleTitle : "" ,
186+ }
187+ result .GroupLayers = append (result .GroupLayers , groupLayer )
188+ }
189+ }
190+
175191 return result , nil
176192}
177193
@@ -181,6 +197,12 @@ func getWMSLayer(serviceLayer pdoknlv3.Layer, serviceExtent string, wms *pdoknlv
181197 layerExtent = serviceLayer .BoundingBoxes [0 ].ToExtent ()
182198 }
183199
200+ groupName := ""
201+ parent := serviceLayer .GetParent (& wms .Spec .Service .Layer )
202+ if parent .IsGroupLayer () {
203+ groupName = parent .Name
204+ }
205+
184206 result := WMSLayer {
185207 BaseLayer : BaseLayer {
186208 Name : serviceLayer .Name ,
@@ -195,7 +217,7 @@ func getWMSLayer(serviceLayer pdoknlv3.Layer, serviceExtent string, wms *pdoknlv
195217 TableName : serviceLayer .Data .GetTableName (),
196218 Postgis : nil ,
197219 },
198- GroupName : "" ,
220+ GroupName : groupName ,
199221 Styles : []Style {},
200222 Offsite : "" ,
201223 GetFeatureInfoIncludesClass : false ,
@@ -226,6 +248,7 @@ func getWMSLayer(serviceLayer pdoknlv3.Layer, serviceExtent string, wms *pdoknlv
226248 } else if serviceLayer .Data .TIF != nil {
227249 tif := serviceLayer .Data .TIF
228250 result .GeometryType = smoothoperatorutils .Pointer ("Raster" )
251+ result .Offsite = smoothoperatorutils .PointerVal (tif .Offsite , "" )
229252 _ = tif
230253
231254 } else if serviceLayer .Data .Postgis != nil {
0 commit comments