Mercurial > dive4elements > river
comparison flys-backend/contrib/shpimporter/axis.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 | 8654e4480fc6 |
comparison
equal
deleted
inserted
replaced
3653:20d249e1589f | 3654:59ca5dab2782 |
---|---|
1 import ogr | 1 import ogr |
2 | 2 |
3 from importer import Importer | 3 from importer import Importer |
4 | 4 |
5 NAME="Axis" | |
5 TABLE_NAME="river_axes" | 6 TABLE_NAME="river_axes" |
6 PATH="Geodaesie/Flussachse+km" | 7 PATH="Geodaesie/Flussachse+km" |
7 | 8 |
8 | 9 |
9 class Axis(Importer): | 10 class Axis(Importer): |
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 | 25 return geomType == 2 |
21 | 26 |