comparison pkg/imports/sr.go @ 1496:3bf1f0de0763

Un-export point, line string and polygon types in import package as these are only used locally.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Tue, 04 Dec 2018 18:27:35 +0100
parents eb82076fdffe
children 5df748916fcf
comparison
equal deleted inserted replaced
1495:d26e3e1fcff1 1496:3bf1f0de0763
232 err = tx.QueryRow(insertPointsSQL, 232 err = tx.QueryRow(insertPointsSQL,
233 m.Bottleneck, 233 m.Bottleneck,
234 m.Date.Time, 234 m.Date.Time,
235 m.DepthReference, 235 m.DepthReference,
236 xyz.AsWKB(), 236 xyz.AsWKB(),
237 polygon.AsWBK(), 237 polygon.asWKB(),
238 m.EPSG, 238 m.EPSG,
239 ).Scan(&id, &lat, &lon, &epsg) 239 ).Scan(&id, &lat, &lon, &epsg)
240 xyz, polygon = nil, nil // not need from now on. 240 xyz, polygon = nil, nil // not need from now on.
241 feedback.Info("storing points took %s", time.Since(start)) 241 feedback.Info("storing points took %s", time.Since(start))
242 if err != nil { 242 if err != nil {
413 } 413 }
414 defer r.Close() 414 defer r.Close()
415 return loadXYZReader(r, feedback) 415 return loadXYZReader(r, feedback)
416 } 416 }
417 417
418 func loadBoundary(z *zip.ReadCloser) (Polygon, error) { 418 func loadBoundary(z *zip.ReadCloser) (polygon, error) {
419 shpF := common.FindInZIP(z, ".shp") 419 shpF := common.FindInZIP(z, ".shp")
420 if shpF == nil { 420 if shpF == nil {
421 return nil, nil 421 return nil, nil
422 } 422 }
423 prefix := strings.TrimSuffix(shpF.Name, path.Ext(shpF.Name)) 423 prefix := strings.TrimSuffix(shpF.Name, path.Ext(shpF.Name))