diff pkg/imports/dma.go @ 2721:56c8ef515d93

WFS downloader: Use new GML/GeoJSON factory function in gemma.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Tue, 19 Mar 2019 12:28:22 +0100
parents 2b6f73c30016
children a10022399e24
line wrap: on
line diff
--- a/pkg/imports/dma.go	Tue Mar 19 12:20:54 2019 +0100
+++ b/pkg/imports/dma.go	Tue Mar 19 12:28:22 2019 +0100
@@ -138,8 +138,7 @@
 		return nil, err
 	}
 
-	urls, err := wfs.GetFeaturesGET(
-		caps, dma.FeatureType, wfs.FormatGeoJSON, dma.SortBy)
+	dl, err := wfs.GetFeatures(caps, dma.FeatureType, dma.SortBy)
 	if err != nil {
 		feedback.Error("Cannot create GetFeature URLs. %v", err)
 		return nil, err
@@ -172,7 +171,7 @@
 	// TODO: Fetch from parameters.
 	user, password := "", ""
 
-	if err := wfs.DownloadURLs(user, password, urls, func(url string, r io.Reader) error {
+	if err := dl.Download(user, password, func(url string, r io.Reader) error {
 		feedback.Info("Get features from: '%s'", url)
 		rfc, err := wfs.ParseRawFeatureCollection(r)
 		if err != nil {