Mercurial > gemma
changeset 3039:130da3cf5c8a
Merged.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Fri, 12 Apr 2019 17:01:13 +0200 |
parents | d47d289d6e68 (current diff) 72451510d417 (diff) |
children | a661e9b8f3b6 |
files | |
diffstat | 1 files changed, 1 insertions(+), 29 deletions(-) [+] |
line wrap: on
line diff
--- a/pkg/imports/wx.go Fri Apr 12 17:00:30 2019 +0200 +++ b/pkg/imports/wx.go Fri Apr 12 17:01:13 2019 +0200 @@ -88,13 +88,6 @@ ST_Transform(wtwaxs::geometry, (SELECT ST_SRID(a) FROM resp))) ` - checkCrossingAxisSQL = ` -SELECT ST_AsText(ST_Intersection(new_line.wtwaxs, axis.wtwaxs)) - FROM waterway.waterway_axis AS axis, waterway.waterway_axis AS new_line - WHERE new_line.id = $1 AND axis.id <> $1 - AND ST_Crosses(new_line.wtwaxs::geometry, axis.wtwaxs::geometry) -` - insertWaterwayAxisSQL = ` WITH resp AS ( SELECT users.current_user_area_utm() AS a @@ -168,12 +161,6 @@ } defer insertStmt.Close() - checkCrossingStmt, err := tx.PrepareContext(ctx, checkCrossingAxisSQL) - if err != nil { - return nil, err - } - defer checkCrossingStmt.Close() - // Delete the old features. if _, err := tx.ExecContext(ctx, deleteWaterwayAxisSQL); err != nil { return nil, err @@ -244,7 +231,6 @@ nobjnam, &outside, &features, - checkCrossingStmt, insertStmt); err != nil { return err } @@ -264,7 +250,6 @@ nobjnam, &outside, &features, - checkCrossingStmt, insertStmt); err != nil { return err } @@ -315,7 +300,7 @@ props waterwayAxisProperties, nobjnam sql.NullString, outside, features *int, - checkCrossingStmt, insertStmt *sql.Stmt, + insertStmt *sql.Stmt, ) error { var id int err := savepoint(func() error { @@ -337,19 +322,6 @@ feedback.Warn(handleError(err).Error()) default: *features++ - var crossing string - switch err := checkCrossingStmt.QueryRowContext( - ctx, - id, - ).Scan(&crossing); { - case err != nil && err != sql.ErrNoRows: - return err - case err == nil: - feedback.Warn( - "Linestring %d crosses previously imported linestring near %s. "+ - "Finding a contiguous axis may not work here", - id, crossing) - } } return nil }