comparison pkg/imports/wx.go @ 1764:bb4348ac52ab

Waterway axis import: Be more verbose when parsing the GetFeature document fails.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Fri, 11 Jan 2019 10:42:34 +0100
parents 807569b08513
children 614c6c766691
comparison
equal deleted inserted replaced
1763:4c21ff668b01 1764:bb4348ac52ab
191 ) 191 )
192 192
193 if err := wfs.DownloadURLs(urls, func(r io.Reader) error { 193 if err := wfs.DownloadURLs(urls, func(r io.Reader) error {
194 rfc, err := wfs.ParseRawFeatureCollection(r) 194 rfc, err := wfs.ParseRawFeatureCollection(r)
195 if err != nil { 195 if err != nil {
196 return err 196 return fmt.Errorf("parsing GetFeature document failed: %v", err)
197 } 197 }
198 if rfc.CRS != nil { 198 if rfc.CRS != nil {
199 crsName := rfc.CRS.Properties.Name 199 crsName := rfc.CRS.Properties.Name
200 if epsg, err = wfs.CRSToEPSG(crsName); err != nil { 200 if epsg, err = wfs.CRSToEPSG(crsName); err != nil {
201 feedback.Error("Unsupported CRS: %d", crsName) 201 feedback.Error("Unsupported CRS: %d", crsName)