comparison flys-backend/contrib/shpimporter/lines.py @ 3654:59ca5dab2782

Shape importer: use python's OptionParse to read user specific configuration from command line. flys-backend/trunk@5231 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Wed, 22 Aug 2012 11:55:55 +0000
parents b0132e1b9719
children
comparison
equal deleted inserted replaced
3653:20d249e1589f 3654:59ca5dab2782
2 2
3 from importer import Importer 3 from importer import Importer
4 4
5 TABLE_NAME="lines" 5 TABLE_NAME="lines"
6 PATH="Geodaesie/Linien" 6 PATH="Geodaesie/Linien"
7 NAME="Lines"
7 8
8 9
9 class Line(Importer): 10 class Line(Importer):
10 11
11 def getPath(self, base): 12 def getPath(self, base):
12 return "%s/%s" % (base, PATH) 13 return "%s/%s" % (base, PATH)
13 14
14 15
15 def getTablename(self): 16 def getTablename(self):
16 return TABLE_NAME 17 return TABLE_NAME
18
19
20 def getName(self):
21 return NAME
17 22
18 23
19 def isGeometryValid(self, geomType): 24 def isGeometryValid(self, geomType):
20 return geomType == 2 or geomType == -2147483646 25 return geomType == 2 or geomType == -2147483646
21 26

http://dive4elements.wald.intevation.org