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'
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"
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'
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'
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'
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'
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'
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'
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'
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'
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'
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'
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'
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'
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'
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'
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'
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
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
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
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
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
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
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
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
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
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
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
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
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