diff pkg/imports/wp.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/wp.go	Tue Mar 19 12:20:54 2019 +0100
+++ b/pkg/imports/wp.go	Tue Mar 19 12:28:22 2019 +0100
@@ -217,8 +217,7 @@
 		feedback.Info("Features will be sorted by '%s'", wp.SortBy)
 	}
 
-	urls, err := wfs.GetFeaturesGET(
-		caps, wp.FeatureType, wfs.FormatGeoJSON, wp.SortBy)
+	dl, err := wfs.GetFeatures(caps, wp.FeatureType, wp.SortBy)
 	if err != nil {
 		feedback.Error("Cannot create GetFeature URLs. %v", err)
 		return err
@@ -247,7 +246,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 {