Mercurial > dive4elements > river
diff flys-backend/contrib/shpimporter/fixpoints.py @ 5198:edba92337204
Log error if KM attribute is not set for fixpoints
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Fri, 08 Mar 2013 10:29:30 +0100 |
parents | c5187ab9f571 |
children | 71a24278322c |
line wrap: on
line diff
--- a/flys-backend/contrib/shpimporter/fixpoints.py Fri Mar 08 10:16:21 2013 +0100 +++ b/flys-backend/contrib/shpimporter/fixpoints.py Fri Mar 08 10:29:30 2013 +0100 @@ -4,6 +4,9 @@ import ogr, osr from importer import Importer +import logging +logger = logging.getLogger("Fixpoints") +fixpoints_no_km_logged=False TABLE_NAME="fixpoints" PATH="Geodaesie/Festpunkte" @@ -49,6 +52,9 @@ elif self.IsFieldSet(feat, "ELBE_KM"): newFeat.SetField("km", feat.GetFieldAsDouble("ELBE_KM")) else: + if not fixpoints_no_km_logged: + logger.error("Could not find KM attribute") + fixpoints_no_km_logged = True return None if self.IsFieldSet(feat, "X"):