示例#1
0
 def transition_import_littoral(self):
     shapefile = ShapeUnzip.getShapefile(self.start.shapefile)
     debug("unzipped")
     try :
         Protection.createGeometries(shapefile.filename, "Conservatoire du littoral", "CDL", version = self.start.version)
     finally:
         shapefile.destroy()
     return 'done'
示例#2
0
 def transition_import_regbiofr(self):
     shapefile = ShapeUnzip.getShapefile(self.start.shapefile)
     debug("unzipped")
     try:
         REGBIOFR.createREGBIOFRGeometries(shapefile.filename, self.start.version)
     finally:
         shapefile.destroy()
     return "done"
示例#3
0
 def transition_import_cen(self):
     shapefile = ShapeUnzip.getShapefile(self.start.shapefile)
     debug("unzipped")
     try :
         Protection.createGeometries(shapefile.filename, "Conservatoire d'espaces naturels", "CEN", version = self.start.version)
     finally:
         shapefile.destroy()
     return 'done'
示例#4
0
 def transition_import_resbio(self):
     shapefile = ShapeUnzip.getShapefile(self.start.shapefile)
     debug("unzipped")
     try :
         Protection.createBioGeometries(shapefile.filename, "Réserve biologique", "RB", version = self.start.version)
     finally:
         shapefile.destroy()
     return 'done'
示例#5
0
 def transition_import_resnatcf(self):
     shapefile = ShapeUnzip.getShapefile(self.start.shapefile)
     debug("unzipped")
     try :
         Protection.createGeometries(shapefile.filename, "Réserve naturelle de chasse et faune sauvage", "RNCFS", version = self.start.version)
     finally:
         shapefile.destroy()
     return 'done'
示例#6
0
 def transition_import_sic(self):
     shapefile = ShapeUnzip.getShapefile(self.start.shapefile)
     debug("unzipped")
     try :
         Protection.createGeometries(shapefile.filename, "Site d'importance communautaire", "SIC", version = self.start.version)
     finally:
         shapefile.destroy()
     return 'done'
示例#7
0
 def transition_import_rescorse(self):
     shapefile = ShapeUnzip.getShapefile(self.start.shapefile)
     debug("unzipped")
     try :
         Protection.createGeometries(shapefile.filename, "Réserve naturelle Corse", "RNC", version = self.start.version)
     finally:
         shapefile.destroy()
     return 'done'
示例#8
0
 def transition_import_parcreg(self):
     shapefile = ShapeUnzip.getShapefile(self.start.shapefile)
     debug("unzipped")
     try :
         Protection.createGeometries(shapefile.filename, "Parc naturel régional", "PNR", version = self.start.version)
     finally:
         shapefile.destroy()
     return 'done'
示例#9
0
 def transition_import_biotope(self):
     shapefile = ShapeUnzip.getShapefile(self.start.shapefile)
     debug("unzipped")
     try :
         Protection.createGeometries(shapefile.filename, "Arrêté de protection de biotope", "APB", version = self.start.version)
     finally:
         shapefile.destroy()
     return 'done'
示例#10
0
 def transition_import_zps(self):
     shapefile = ShapeUnzip.getShapefile(self.start.shapefile)
     debug("unzipped")
     try :
         Protection.createGeometries(shapefile.filename, "Zone de protection spéciale", "ZPS", version = self.start.version)
     finally:
         shapefile.destroy()
     return 'done'
示例#11
0
 def transition_import_znieff2(self):
     shapefile = ShapeUnzip.getShapefile(self.start.shapefile)
     debug("unzipped")
     try :
         Protection.createGeometries(shapefile.filename, "Zone naturelle d'intérêt écologique faunistique et floristique de type 2 (mer)", "ZNIEFF 2 mer", version = self.start.version)
     finally:
         shapefile.destroy()
     return 'done'        
示例#12
0
 def transition_import_courseau(self):
     shapefile = ShapeUnzip.getShapefile(self.start.shapefile)
     debug("unzipped")
     try :            
         CoursEau.createCoursEauGeometries(shapefile.filename,
                                        self.start.version)
     finally:
         shapefile.destroy()
     return 'done'
示例#13
0
 def transition_import_ssecteur(self):
     shapefile = ShapeUnzip.getShapefile(self.start.shapefile)
     debug("unzipped")
     try :            
         SousSecteur.createSousSecteurGeometries(shapefile.filename,
                                        self.start.version)
     finally:
         shapefile.destroy()
     return 'done'
示例#14
0
 def transition_import_zico(self):
     shapefile = ShapeUnzip.getShapefile(self.start.shapefile)
     debug("unzipped")
     try :
         Protection.createZicoGeometries(shapefile.filename, u"Zone d'intérêt communautaire pour les oiseaux", 
                                     "ZICO", version = self.start.version)
     finally:
         shapefile.destroy()
     return 'done'
示例#15
0
 def transition_import_foret(self):
     shapefile = ShapeUnzip.getShapefile(self.start.shapefile)
     debug("unzipped")
     try :            
         Foret.createForetGeometries(shapefile.filename,
                                        self.start.version)
     finally:
         shapefile.destroy()
     return 'done'
示例#16
0
 def transition_import_ramsar(self):
     shapefile = ShapeUnzip.getShapefile(self.start.shapefile)
     debug("unzipped")
     try :
         Protection.createGeometries(shapefile.filename, "Site Ramsar",
                                     "RAMSAR", version = self.start.version)
     finally:
         shapefile.destroy()
     return 'done'
示例#17
0
文件: clc.py 项目: silpol/tryton-bef
 def transition_import_clc(self):
     shapefile = ShapeUnzip.getShapefile(self.start.shapefile)
     debug("unzipped")
     try :
         year = "20" + shapefile.name[3:5]
         Clc.createClcGeometries(shapefile.filename, int(year),
                                        self.start.version)
     finally:
         shapefile.destroy()
     return 'done'
示例#18
0
 def importerCEN(cls, data, version):
     binData = base64.decodestring(data)
     shapefile = ShapeUnzip.getShapefile(binData)
     ret = False
     try :
         Protection.createGeometries(shapefile.filename, "Conservatoire d'espaces naturels",
                                     "CEN", version = version)
         ret = True
     finally:
         shapefile.destroy()
     return ret
示例#19
0
 def importerRNR(cls, data, version):
     binData = base64.decodestring(data)
     shapefile = ShapeUnzip.getShapefile(binData)
     ret = False
     try :
         Protection.createGeometries(shapefile.filename, "Réserve naturelle régionale", "RNR",
                                     version = version)
         ret = True
     finally:
         shapefile.destroy()
     return ret
示例#20
0
 def importerPNM(cls, data, version):
     binData = base64.decodestring(data)
     shapefile = ShapeUnzip.getShapefile(binData)
     ret = False
     try :
         Protection.createGeometries(shapefile.filename, "Parc naturel marin", "PNM",
                                     version = version)
         ret = True
     finally:
         shapefile.destroy()
     return ret
示例#21
0
 def importerAPB(cls, data, version):
     binData = base64.decodestring(data)
     shapefile = ShapeUnzip.getShapefile(binData)
     ret = False
     try :
         Protection.createGeometries(shapefile.filename, "Arrêté de protection de biotope",
                                     "APB", version = version)
         ret = True
     finally:
         shapefile.destroy()
     return ret
示例#22
0
 def importerRamsar(cls, data, version):
     binData = base64.decodestring(data)
     shapefile = ShapeUnzip.getShapefile(binData)
     ret = False
     try :
         Protection.createGeometries(shapefile.filename, "Site Ramsar",
                                     "RAMSAR", version = version)
         ret = True
     finally:
         shapefile.destroy()
     return ret
示例#23
0
 def importerZPS(cls, data, version):
     binData = base64.decodestring(data)
     shapefile = ShapeUnzip.getShapefile(binData)
     ret = False
     try :
         Protection.createGeometries(shapefile.filename, "Zone de protection spéciale", "ZPS",
                                     version = version)
         ret = True
     finally:
         shapefile.destroy()
     return ret
示例#24
0
 def importerRB(cls, data, version):
     binData = base64.decodestring(data)
     shapefile = ShapeUnzip.getShapefile(binData)
     ret = False
     try :
         Protection.createBioGeometries(shapefile.filename, "Réserve biologique",
                                        "RB", version = version)
         ret = True
     finally:
         shapefile.destroy()
     return ret
示例#25
0
 def importerREGBIOFR(cls, data, version):
     binData = base64.decodestring(data)
     shapefile = ShapeUnzip.getShapefile(binData)
     ret = False
     try:
         REGBIOFR.deleteOldREGBIOFR()
         REGBIOFR.createREGBIOFRGeometries(shapefile.filename, version)
         ret = True
     finally:
         shapefile.destroy()
     return ret
示例#26
0
 def importerSIC(cls, data, version):
     binData = base64.decodestring(data)
     shapefile = ShapeUnzip.getShapefile(binData)
     ret = False
     try :
         Protection.createGeometries(shapefile.filename, "Site d'importance communautaire",
                                     "SIC", version = version)
         ret = True
     finally:
         shapefile.destroy()
     return ret
示例#27
0
 def importerCoursEau(cls, data, version):
     binData = base64.decodestring(data)
     shapefile = ShapeUnzip.getShapefile(binData)
     ret = False
     try :
         CoursEau.deleteOldCoursEau()
         CoursEau.createCoursEauGeometries(shapefile.filename,
                                        version)
         ret = True
     finally:
         shapefile.destroy()
     return ret
示例#28
0
 def importerSousSecteur(cls, data, version):
     binData = base64.decodestring(data)
     shapefile = ShapeUnzip.getShapefile(binData)
     ret = False
     try :
         SousSecteur.deleteOldSousSecteur()
         SousSecteur.createSousSecteurGeometries(shapefile.filename,
                                        version)
         ret = True
     finally:
         shapefile.destroy()
     return ret
示例#29
0
 def importerZICO(cls, data, version):
     binData = base64.decodestring(data)
     shapefile = ShapeUnzip.getShapefile(binData)
     ret = False
     try :
         Protection.createZicoGeometries(shapefile.filename,
                                         u"Zone d'intérêt communautaire pour les oiseaux",
                                         "ZICO", version = version)
         ret = True
     finally:
         shapefile.destroy()
     return ret
示例#30
0
 def importerForet(cls, data, version):
     binData = base64.decodestring(data)
     shapefile = ShapeUnzip.getShapefile(binData)
     ret = False
     try :
         Foret.deleteOldForet()
         Foret.createForetGeometries(shapefile.filename,
                                        version)
         ret = True
     finally:
         shapefile.destroy()
     return ret