# HG changeset patch # User Andre Heinecke # Date 1359631319 -3600 # Node ID 11b459a3eb5c61c3339036c7c8c8a5e75900b5e5 # Parent 03989fa957fcf963e92b04391bb591fa08cf0d3a Importer: Import hws_points based on geom type diff -r 03989fa957fc -r 11b459a3eb5c flys-backend/contrib/shpimporter/hws.py --- a/flys-backend/contrib/shpimporter/hws.py Thu Jan 31 12:07:40 2013 +0100 +++ b/flys-backend/contrib/shpimporter/hws.py Thu Jan 31 12:21:59 2013 +0100 @@ -113,10 +113,12 @@ return "HWS_POINTS" def isGeometryValid(self, geomType): - return geomType == 1 + return geomType == ogr.wkbPoint or geomType == ogr.wkbPoint25D def isShapeRelevant(self, name, path): - if "punkte" in os.path.basename(path).lower(): + shp = ogr.Open(path) + if shp.GetLayerByName(name).GetGeomType() == ogr.wkbPoint or \ + shp.GetLayerByName(name).GetGeomType() == ogr.wkbPoint25D: return True else: return False