log warning when using validated_geometry for non-polygons

Oliver Tonnhofer 2015-02-24 14:06:50 +01:00
parent cfd2201735
commit 60ff020b57
1 changed files with 4 additions and 0 deletions

View File

@ -60,6 +60,10 @@ type validatedGeometryType struct {
}
func (t *validatedGeometryType) GeneralizeSql(colSpec *ColumnSpec, spec *GeneralizedTableSpec) string {
if spec.Source.GeometryType != "polygon" {
// TODO return warning earlier
log.Warnf("validated_geometry column returns polygon geometries for %s", spec.FullName)
}
return fmt.Sprintf(`ST_Buffer(ST_SimplifyPreserveTopology("%s", %f), 0) as "%s"`,
colSpec.Name, spec.Tolerance, colSpec.Name,
)