Mercurial > gemma
comparison pkg/imports/wp.go @ 2719:2b6f73c30016
WFS downloader: Add BasicAuth support for downloading. TODO: Use it.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Tue, 19 Mar 2019 12:20:54 +0100 |
parents | 02505fcff63c |
children | 56c8ef515d93 |
comparison
equal
deleted
inserted
replaced
2718:eae8ec732101 | 2719:2b6f73c30016 |
---|---|
242 unsupported = stringCounter{} | 242 unsupported = stringCounter{} |
243 missingProperties int | 243 missingProperties int |
244 features int | 244 features int |
245 ) | 245 ) |
246 | 246 |
247 if err := wfs.DownloadURLs(urls, func(url string, r io.Reader) error { | 247 // TODO: Fetch from parameters. |
248 user, password := "", "" | |
249 | |
250 if err := wfs.DownloadURLs(user, password, urls, func(url string, r io.Reader) error { | |
248 feedback.Info("Get features from: '%s'", url) | 251 feedback.Info("Get features from: '%s'", url) |
249 rfc, err := wfs.ParseRawFeatureCollection(r) | 252 rfc, err := wfs.ParseRawFeatureCollection(r) |
250 if err != nil { | 253 if err != nil { |
251 return fmt.Errorf("parsing GetFeature document failed: %v", err) | 254 return fmt.Errorf("parsing GetFeature document failed: %v", err) |
252 } | 255 } |