From 55fc92794b6416fe5baf9c2e1b77bc4dbadbe7a2 Mon Sep 17 00:00:00 2001 From: A Nilsen <ban@nibio.no> Date: Wed, 27 Dec 2023 15:01:11 +0000 Subject: [PATCH] Inkludert MOF --- get_nib.py | 50 +++++++++++++++++++++++++++++++++++--------------- 1 file changed, 35 insertions(+), 15 deletions(-) diff --git a/get_nib.py b/get_nib.py index 470cdc4..cc7ca97 100644 --- a/get_nib.py +++ b/get_nib.py @@ -517,15 +517,19 @@ class getnib: param = '' reset = False of = False + mof = False sat = False ir = False if self.dlg.checkBox_resetNib.isChecked(): # Empty the Nib-prosjekt group reset = True - if self.dlg.checkBox_of_proj.isChecked(): # Orthphoto-projects is checked + if self.dlg.checkBox_of_proj.isChecked(): # Orthophoto-projects is checked of = True + if self.dlg.checkBox_mof_proj.isChecked(): # MOF-projects is checked + mof = True + if self.dlg.checkBox_sat_proj.isChecked(): # Satellite-projects is checked sat = True @@ -658,23 +662,39 @@ class getnib: # group.setExpanded(False) # Collapse the layer group # Load Norge i bilder-project based on the bounding box (geojson-format x1,y1;x2,y2;x3,y3;...) - # https://norgeibilder.no/dok/webtjenester.pdf - # 1 = Ortofoto 10, 2 = Ortofoto 20, 3 = Ortofoto 50, 4 = Ortofoto N50, 5 = Ortofoto Skog, 6 = Satellittbilde, 7 = Infrarødt, 8 = Rektifiserte flybilder, 9 = Ortofoto - if of and not sat and not ir: - param ='{Filter:"ortofototype in (1,2,3,4,5,8,9)",Coordinates:"'+coords+'",InputWKID:'+str(crs_proj_int)+',ReturnMetadata:true,StopOnCover:false}' - if of and sat and not ir: - param = '{Filter:"ortofototype in (1,2,3,4,5,6,8,9)",Coordinates:"'+coords+'",InputWKID:'+str(crs_proj_int)+',ReturnMetadata:true,StopOnCover:false}' - if of and ir and not sat: - param = '{Filter:"ortofototype in (1,2,3,4,5,6,7,9)",Coordinates:"'+coords+'",InputWKID:'+str(crs_proj_int)+',ReturnMetadata:true,StopOnCover:false}' - if of and sat and ir: - param = '{Filter:"ortofototype in (1,2,3,4,5,6,7,8,9)",Coordinates:"'+coords+'",InputWKID:'+str(crs_proj_int)+',ReturnMetadata:true,StopOnCover:false}' - if sat and not of and not ir: + # https://norgeibilder.no/dok/webtjenester.pdf og + # https://register.geonorge.no/data/documents/Produktspesifikasjoner_digitale-ortofoto_v8_produktspesifikasjon-for-ortofoto-v5-0-geodata_.pdf + # 1 = Ortofoto 10, 2 = Ortofoto 20, 3 = Ortofoto 50, 4 = Ortofoto N50, 5 = Ortofoto Skog, 6 = Satellittbilde, 7 = Infrarødt, + # 8 = Rektifiserte flybilder, 9 = Ortofoto- produsert med DTM, 10 = Sant ortofoto, 11 = 3D ortofoto, 12 = Midlertidig ortofoto (MOF) + if of and not mof and not sat and not ir: + param ='{Filter:"ortofototype in (1,2,3,4,5,8,9,10,11)",Coordinates:"'+coords+'",InputWKID:'+str(crs_proj_int)+',ReturnMetadata:true,StopOnCover:false}' + if of and mof and not sat and not ir: + param ='{Filter:"ortofototype in (1,2,3,4,5,8,9,10,11,12)",Coordinates:"'+coords+'",InputWKID:'+str(crs_proj_int)+',ReturnMetadata:true,StopOnCover:false}' + if of and mof and sat and not ir: + param = '{Filter:"ortofototype in (1,2,3,4,5,6,8,9,10,11,12)",Coordinates:"'+coords+'",InputWKID:'+str(crs_proj_int)+',ReturnMetadata:true,StopOnCover:false}' + if of and mof and ir and not sat: + param = '{Filter:"ortofototype in (1,2,3,4,5,6,7,9,10,11,12)",Coordinates:"'+coords+'",InputWKID:'+str(crs_proj_int)+',ReturnMetadata:true,StopOnCover:false}' + if of and mof and sat and ir: + param = '{Filter:"ortofototype in (1,2,3,4,5,6,7,8,9,10,11,12)",Coordinates:"'+coords+'",InputWKID:'+str(crs_proj_int)+',ReturnMetadata:true,StopOnCover:false}' + if of and not mof and not sat and ir: + param ='{Filter:"ortofototype in (1,2,3,4,5,7,8,9,10)",Coordinates:"'+coords+'",InputWKID:'+str(crs_proj_int)+',ReturnMetadata:true,StopOnCover:false}' + if of and not mof and sat and ir: + param ='{Filter:"ortofototype in (1,2,3,4,5,6,7,8,9,10)",Coordinates:"'+coords+'",InputWKID:'+str(crs_proj_int)+',ReturnMetadata:true,StopOnCover:false}' + if mof and not of and not sat and not ir: + param = '{Filter:"ortofototype in (12)",Coordinates:"'+coords+'",InputWKID:'+str(crs_proj_int)+',ReturnMetadata:true,StopOnCover:false}' + if sat and not of and not mof and not ir: param = '{Filter:"ortofototype in (6)",Coordinates:"'+coords+'",InputWKID:'+str(crs_proj_int)+',ReturnMetadata:true,StopOnCover:false}' - if sat and ir and not of: + if sat and not of and mof and not ir: + param = '{Filter:"ortofototype in (6,12)",Coordinates:"'+coords+'",InputWKID:'+str(crs_proj_int)+',ReturnMetadata:true,StopOnCover:false}' + if sat and ir and not mof and not of: param ='{Filter:"ortofototype in (6,7)",Coordinates:"'+coords+'",InputWKID:'+str(crs_proj_int)+',ReturnMetadata:true,StopOnCover:false}' - if ir and not sat and not of: + if sat and ir and mof and not of: + param ='{Filter:"ortofototype in (6,7,12)",Coordinates:"'+coords+'",InputWKID:'+str(crs_proj_int)+',ReturnMetadata:true,StopOnCover:false}' + if ir and not sat and not of and not mof: param ='{Filter:"ortofototype in (7)",Coordinates:"'+coords+'",InputWKID:'+str(crs_proj_int)+',ReturnMetadata:true,StopOnCover:false}' - if not of and not sat and not ir: + if ir and not sat and not of and mof: + param ='{Filter:"ortofototype in (7,12)",Coordinates:"'+coords+'",InputWKID:'+str(crs_proj_int)+',ReturnMetadata:true,StopOnCover:false}' + if not of and not mof and not sat and not ir: self.iface.messageBar().pushMessage("Error", "project type must be set", level=Qgis.Critical, duration=3) return -- GitLab