Mercurial > gemma
diff pkg/imports/fd.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/fd.go Tue Mar 19 12:20:54 2019 +0100 +++ b/pkg/imports/fd.go Tue Mar 19 12:28:22 2019 +0100 @@ -207,8 +207,7 @@ return nil, err } - urls, err := wfs.GetFeaturesGET( - caps, fd.FeatureType, wfs.FormatGeoJSON, fd.SortBy) + dl, err := wfs.GetFeatures(caps, fd.FeatureType, fd.SortBy) if err != nil { feedback.Error("Cannot create GetFeature URLs. %v", err) return nil, err @@ -238,7 +237,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 {