sigrennesmetropole / geor_urbanisme_mapstore

GNU General Public License v3.0
2 stars 5 forks source link

Problem with plot and background on print #20

Closed jusabatier closed 3 years ago

jusabatier commented 3 years ago

There still have two problems with printing function :

Also as I know, most platform use Geobretagne's custom OSM MWS instead of official OSM tiles.

jusabatier commented 3 years ago

@catmorales Any opinion on this ?

I think it's not functional to just have a cadastral WMS and nothing else on generated documents.

I saw your ticket about WMTS base layers (https://github.com/sigrennesmetropole/geor_urbanisme_mapstore/issues/23) which is solved.

What are those base layers ? What SRS do you use ?

Isn't it a problem for you to not highligth the targeted plot ?

catmorales commented 3 years ago

Hello @jusabatier

i'm testing with an application context based on the new.json wich is in EPSG :3857


 "map":{
      "center":{
         "x":-186936.00,
         "y":6125395.00,
         "crs":"EPSG:3857"
      },
      "maxExtent":[
         -608948.00,
         5716000.00,
         80820.00,
         6482445.00
      ],
      "projection":"EPSG:3857",
      "units":"m",
      "zoom":10,

Our base layers are WMTS published by our geowebcache published in 3857, 2154 and 3948. Target plotted is higjlighted in the print and the screen image

NRU_350238000BH0227 (1).pdf

catmorales commented 3 years ago

Urbanisme tool print the active base layer . I've changed it to orthophoto and it works :
Both are WMTS. image

catmorales commented 3 years ago

I added Open street map too provided with mapstore but it doesn't work: image

jusabatier commented 3 years ago

Ok, I reach have a background layer. I didn't understand that it use the selected one in mapstore, thanks for the info.

But I have no plot highlight like you have :

image

Can you paste your request parameter to report.pdf for generating the PDF ?

Also I realised that the zoom used is the current in mapstore, not the more adapted for the selected plot.

catmorales commented 3 years ago

parameters for report.pdf

{"layout":"A4 portrait","outputFilename":"NRU_350238000BH0227","attributes":{"map":{"scale":4513.997733376551,"center":[-185830.359046933,6125913.658608801],"dpi":"96","layers":[{"type":"Vector","name":"GetFeatureInfoHighLight","opacity":1,"geoJson":{"type":"FeatureCollection","features":[{"type":"Feature","id":"urbanisme_parcelle.fid-3efc99e2_17941d16759_-5487","geometry":{"type":"Polygon","coordinates":[[[-186257.485308,6125791.053829],[-186171.894885,6125805.8785850005],[-186171.977761,6125807.496108],[-186072.50778,6125822.173022],[-186064.764078,6125822.17848],[-186056.967312,6125819.573023],[-186051.087405,6125813.741005],[-186049.125117,6125805.567288],[-186044.998842,6125663.048815],[-186044.438449,6125614.406894001],[-186049.767803,6125549.22676],[-185991.775296,6125548.789064],[-185986.086793,6125549.585849],[-185986.301742,6125552.397153],[-185976.347419,6125553.738903],[-185976.084082,6125550.870449],[-185850.510195,6125566.546668],[-185858.76353100003,6125622.787921],[-185855.89067,6125627.049031001],[-185809.63860800004,6125632.521285001],[-185814.6407,6125690.733509],[-185768.416333,6125697.16538],[-185771.49709500003,6125773.403085],[-185600.25457000002,6125818.15949],[-185501.840016,6125816.600026],[-185501.676278,6125821.327426],[-185469.066202,6125818.577012],[-185449.612222,6126010.787998],[-185598.351304,6126018.423595],[-185660.685261,6126044.051039001],[-185703.714809,6126048.916706],[-185732.830929,6126056.295923],[-185733.619702,6126058.441485],[-185757.105722,6126063.128111],[-185809.616023,6126068.964204],[-185934.811361,6126079.603492],[-185935.74854400003,6126072.064424],[-185954.123193,6126073.47068],[-185953.556882,6126081.197529],[-185961.928126,6126081.905219],[-185962.782911,6126073.003954],[-185982.530602,6126074.326618],[-185981.712488,6126083.586238],[-186090.808555,6126095.758629],[-186093.469298,6126069.169085],[-186090.122606,6126068.816841],[-186078.642563,6125927.808188],[-186095.406811,6125912.996075],[-186201.981847,6125930.818874],[-186203.573285,6125930.631867],[-186203.856728,6125929.127241],[-186205.129365,6125929.365286],[-186204.845922,6125930.869912],[-186220.028931,6125933.746856],[-186220.37069,6125931.968247],[-186222.036786,6125932.272485],[-186221.695027,6125934.051094],[-186226.604679,6125934.984225],[-186226.900326,6125933.433782],[-186228.613006,6125933.765231],[-186228.316454,6125935.300705],[-186233.454497,6125936.295051],[-186233.775462,6125934.667947],[-186236.370039,6125935.216147],[-186239.182445,6125922.529979],[-186237.634836,6125922.203508],[-186237.982025,6125920.514714],[-186239.51471,6125920.842093001],[-186239.807204,6125919.487156],[-186241.369736,6125919.812717],[-186241.09126,6125921.151777],[-186255.469273,6125924.092678],[-186255.780744,6125922.556296],[-186257.509253,6125922.9018],[-186257.199594,6125924.468119],[-186259.10990900002,6125924.847627],[-186258.761818,6125926.521454],[-186256.850597,6125926.126977],[-186253.987226,6125940.198468],[-186271.837101,6125942.342078],[-186271.670303,6125943.298745],[-186278.08958,6125944.425409],[-186278.368482,6125942.845934],[-186279.897549,6125943.11343],[-186279.618647,6125944.692906],[-186286.446309,6125945.884848],[-186286.72521,6125944.305372],[-186288.375482,6125944.595537],[-186288.096581,6125946.175013],[-186294.74244,6125947.332945],[-186295.023151,6125945.783406],[-186296.658499,6125946.074478],[-186296.392712,6125947.623108],[-186303.712874,6125948.785056001],[-186303.346286,6125950.895713],[-186319.032252,6125953.666753],[-186327.080743,6125906.962954],[-186288.358155,6125900.741591],[-186291.688716,6125787.950148],[-186257.485308,6125791.053829]]]},"geometry_name":"geom","properties":{"ogc_fid":129115,"lot":"2020-10","inspireid":"FR350238000BH0227","id_parc":"350238000BH0227","commune":"350238","section":"350238000BH","section_txt":"BH","parcelle_txt":"227","section_parcelle_txt":"BH 227","supf":108373,"ssurf":108246.79,"ssurfb":1624.03,"scos":1.5,"ms_style":"Polygon"},"bbox":[-186327.080743,6125548.789064,-185449.612222,6126095.758629]}]},"style":{"1":{"fillColor":"#0000FF","fillOpacity":0.1,"strokeColor":"#0000FF","strokeOpacity":1,"strokeWidth":3,"strokeDashstyle":"dash","strokeLinecap":"round"},"Polygon":{"fillColor":"#0000FF","fillOpacity":0.1,"strokeColor":"#0000FF","strokeOpacity":1,"strokeWidth":3,"strokeDashstyle":"solid","strokeLinecap":"round"},"LineString":{"strokeColor":"#0000FF","strokeOpacity":1,"strokeWidth":3},"Point":{"externalGraphic":"http://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.3/images/marker-icon.png","graphicWidth":25,"graphicHeight":41,"graphicXOffset":-12,"graphicYOffset":-41},"FeatureCollection":{"fillColor":"#0000FF","fillOpacity":0.1,"strokeColor":"#0000FF","pointRadius":5,"strokeOpacity":1,"strokeWidth":1},"styleProperty":"ms_style"}},{"baseURL":"https://portail-test.sig.rennesmetropole.fr/geoserver/wms?","opacity":1,"type":"WMS","layers":["app:urbanisme_parcelle"],"customParams":{"TRANSPARENT":true,"TILED":true,"EXCEPTIONS":"application/vnd.ogc.se_inimage","scaleMethod":"accurate","ENV":""},"imageFormat":"image/png"},{"baseURL":"https://portail-test.sig.rennesmetropole.fr/geowebcache/service/wmts","type":"WMTS","layer":"ref_fonds:pvci","matrixSet":"EPSG:3857","style":"","name":"ref_fonds:pvci","requestEncoding":"KVP","opacity":1,"version":"1.0.0","matrices":[{"identifier":"EPSG:3857:0","matrixSize":[1,1],"tileSize":[256,256],"topLeftCorner":[-20037508.34,20037508],"scaleDenominator":559082264.0287179},{"identifier":"EPSG:3857:1","matrixSize":[2,2],"tileSize":[256,256],"topLeftCorner":[-20037508.34,20037508],"scaleDenominator":279541132.0143589},{"identifier":"EPSG:3857:2","matrixSize":[4,4],"tileSize":[256,256],"topLeftCorner":[-20037508.34,20037508],"scaleDenominator":139770566.0071794},{"identifier":"EPSG:3857:3","matrixSize":[8,8],"tileSize":[256,256],"topLeftCorner":[-20037508.34,20037508],"scaleDenominator":69885283.00358972},{"identifier":"EPSG:3857:4","matrixSize":[16,16],"tileSize":[256,256],"topLeftCorner":[-20037508.34,20037508],"scaleDenominator":34942641.50179486},{"identifier":"EPSG:3857:5","matrixSize":[32,32],"tileSize":[256,256],"topLeftCorner":[-20037508.34,20037508],"scaleDenominator":17471320.75089743},{"identifier":"EPSG:3857:6","matrixSize":[64,64],"tileSize":[256,256],"topLeftCorner":[-20037508.34,20037508],"scaleDenominator":8735660.375448715},{"identifier":"EPSG:3857:7","matrixSize":[128,128],"tileSize":[256,256],"topLeftCorner":[-20037508.34,20037508],"scaleDenominator":4367830.1877243575},{"identifier":"EPSG:3857:8","matrixSize":[256,256],"tileSize":[256,256],"topLeftCorner":[-20037508.34,20037508],"scaleDenominator":2183915.0938621787},{"identifier":"EPSG:3857:9","matrixSize":[512,512],"tileSize":[256,256],"topLeftCorner":[-20037508.34,20037508],"scaleDenominator":1091957.5469310887},{"identifier":"EPSG:3857:10","matrixSize":[1024,1024],"tileSize":[256,256],"topLeftCorner":[-20037508.34,20037508],"scaleDenominator":545978.7734655447},{"identifier":"EPSG:3857:11","matrixSize":[2048,2048],"tileSize":[256,256],"topLeftCorner":[-20037508.34,20037508],"scaleDenominator":272989.3867327723},{"identifier":"EPSG:3857:12","matrixSize":[4096,4096],"tileSize":[256,256],"topLeftCorner":[-20037508.34,20037508],"scaleDenominator":136494.69336638617},{"identifier":"EPSG:3857:13","matrixSize":[8192,8192],"tileSize":[256,256],"topLeftCorner":[-20037508.34,20037508],"scaleDenominator":68247.34668319307},{"identifier":"EPSG:3857:14","matrixSize":[16384,16384],"tileSize":[256,256],"topLeftCorner":[-20037508.34,20037508],"scaleDenominator":34123.67334159654},{"identifier":"EPSG:3857:15","matrixSize":[32768,32768],"tileSize":[256,256],"topLeftCorner":[-20037508.34,20037508],"scaleDenominator":17061.83667079827},{"identifier":"EPSG:3857:16","matrixSize":[65536,65536],"tileSize":[256,256],"topLeftCorner":[-20037508.34,20037508],"scaleDenominator":8530.918335399136},{"identifier":"EPSG:3857:17","matrixSize":[131072,131072],"tileSize":[256,256],"topLeftCorner":[-20037508.34,20037508],"scaleDenominator":4265.459167699568},{"identifier":"EPSG:3857:18","matrixSize":[262144,262144],"tileSize":[256,256],"topLeftCorner":[-20037508.34,20037508],"scaleDenominator":2132.729583849784},{"identifier":"EPSG:3857:19","matrixSize":[524288,524288],"tileSize":[256,256],"topLeftCorner":[-20037508.34,20037508],"scaleDenominator":1066.3647919248917},{"identifier":"EPSG:3857:20","matrixSize":[1048576,1048576],"tileSize":[256,256],"topLeftCorner":[-20037508.34,20037508],"scaleDenominator":533.1823959624461},{"identifier":"EPSG:3857:21","matrixSize":[2097152,2097152],"tileSize":[256,256],"topLeftCorner":[-20037508.34,20037508],"scaleDenominator":266.5911979812229},{"identifier":"EPSG:3857:22","matrixSize":[4194304,4194304],"tileSize":[256,256],"topLeftCorner":[-20037508.34,20037508],"scaleDenominator":133.29559899061144}],"imageFormat":"image/png"}],"projection":"EPSG:3857"},"parcelle":"350238000BH0227","commune":"Rennes","codeSection":"BH","numero":"227","adresseCadastrale":" RUE DE PARIS","contenanceDGFiP":108373,"surfaceSIG":108247,"codeProprio":"350238+13368","nomProprio":"COMMUNE DE RENNES","adresseProprio":"PL DE LA MAIRIE 35000 RENNES","dateRU":"10/02/2020","datePCI":"06/2019","libelles":"Plan Local d'Urbanisme intercommunal (PLUi) : Élaboration approuvée par délibération du conseil de Rennes Métropole du 19/12/2019. Mise à jour n°1 par arrêté du Président de Rennes Métropole du 15/01/2020\n\nZone UGl\n\nZone UG1a\n\nZone Ne\n\nTerrain concerné par la servitude de dégagement contre les obstacles à la navigation aérienne (T7) .\n\nTerrain concerné par une servitude relative à la protection contre les obstacles de centres d'émission et de réception exploités par l'État - ZP Zone Spéciale de dégagement (générateur) (PT2).\n\nTerrain concerné par une servitude de protection des monuments historiques - élément bâti des monuments historiques (générateur) (AC1).\n\nTerrain concerné par une servitude relative à la protection des centres de réception contre les perturbations électromagnétiques - ZG Zone de Garde (assiette) (PT1).\n\nTerrain concerné par une servitude de protection des monuments historiques inscrits (assiette) (AC1).\n\nTerrain concerné par une servitude relative à la protection contre les obstacles de centres d'émission et de réception exploités par l'État - ZP Zone Spéciale de dégagement (assiette) (PT2).\n\nTerrain concerné par une servitude relative à la protection des centres de réception contre les perturbations électromagnétiques - ZP Zone de Protection (assiette) (PT1).\n\nTerrain concerné par une servitude relative à l'établissement des lignes électriques (dont htb) (générateur) (I4).\n\nTerrain concerné par une servitude de protection des monuments historiques classés (générateur) (AC1).\n\nTerrain situé dans un secteur de réglementation du stationnement.\n\nTerrain concerné par les règles de végétalisation indiquées dans le règlement litteral.\n\nTerrain concerné par une règle de hauteur indiquée dans le règlement littéral.\n\nTerrain concerné par une zone de protection au titre de l'archéologie.\n\nTerrain concerné par une orientation d'aménagement et de programmation (OAP) thématique : \"Projet patrimonial, paysager, trame verte et bleue\".\n\nTerrain concerné par un espace boisé classé.\n\nTerrain concerné par une Orientation d'Aménagement et de Programmation (OAP) communale.\n\nTerrain concerné par un Patrimoine Bâti d'Intérêt Local (PBIL) (3 étoiles).\n\nTerrain concerné par un Patrimoine Bâti d'Intérêt Local (PBIL) (2 étoiles).\n\nTerrain situé dans un périmètre concerné par le guide de recommandations \"restauration et adaptation du patrimoine bâti d'intérêt local\".\n\nTerrain concerné par une Orientation d'Aménagement et de Programmation (OAP) thématique : \"Les axes de développement de la ville archipel\".\n\nTerrain concerné par une marge de recul.\n\nTerrain concerné par un/des monument(s) historique(s) situé(s) sur le règlement graphique (plan de zonage).\n\nTerrain concerné par une Orientation d'Aménagement et de Programmation (OAP) thématique : \"santé, climat, énergie\".\n\nTerrain situé dans un secteur obligatoire à l'infiltration des eaux pluviales.\n\nTerrain concerné par la Redevance Archéologique Préventive (RAP), (taux de 0,40%).\n\nTerrain concerné par la Taxe d'Aménagement (TA) départementale créée par délibération du Conseil Général d'Ille et Vilaine du 10/11/2011 (taux de 1,85%).\n\nTerrain concerné par la Taxe d'Aménagement (TA) sectorisée créée par délibération du Conseil de Rennes Métropole du 15/11/2018 (taux de 6%)."}}

catmorales commented 3 years ago

Be careful in the default configuration of the plugin , in th elayer parameter , geoserver workspace is missing, i added it. In our configuration it's "app:"

{
            "name": "Urbanisme",
            "cfg": {
              "helpUrl": "http://docs.georchestra.org/addon_urbanisme/",
              "cadastrappUrl": "/cadastrapp/services",
              "urbanismeappUrl": "/urbanisme",
              "layer": app:urbanisme_parcelle"
            }
jusabatier commented 3 years ago

Ok, I get the problem :

In my request there is no "GetFeatureInfoHighLight" layer... Don't know why

Any suggestion @offtherailz @tdipisa ?

Here is my plugin conf :

{
  "cfg": {
    "helpUrl": "http://docs.georchestra.org/addon_urbanisme/",
    "cadastrappUrl": "/cadastrapp/services",
    "urbanismeappUrl": "/servitudes",
    "layer": "pci:geo_parcelle",
    "idParcelleKey": "geo_parcelle"
  },
  "override": {}
}

Maybe it's related to idParcelleKey parameter which is recently added and it still have problem ?

catmorales commented 3 years ago

Do you use the last zip ? https://github.com/sigrennesmetropole/geor_urbanisme_mapstore/releases/tag/1.0.0-rc1

jusabatier commented 3 years ago

Yes, I updated it this morning

catmorales commented 3 years ago

Maybe it's related to idParcelleKey parameter which is recently added and it still have problem ?

Yes i don't use this parameter , it's not referenced in https://github.com/sigrennesmetropole/geor_urbanisme_mapstore/blob/1.0.0-rc1/localConfig.json#L284-L291

jusabatier commented 3 years ago

I already asked to add it in the README documentation of the addon but it's not yet done.

tdipisa commented 3 years ago

@offtherailz can you please do a quick check on this early next week?

offtherailz commented 3 years ago

Hi @jusabatier I updated the readme, thank you for reporting. Accordingly to your report, I tried to figure out what the problem could be, and I found one point in the code that may be the cause of the issue. Anyway I can not replicate it locally, so I attached the extension with the fix (for the PR #27) Please let me know it fixes your problem. Otherwise I have to investigate more.

Urbanisme.zip

jusabatier commented 3 years ago

Hi,

I confirm you that it solve the problem

Tested with your Zip and it works well !

Thaks for this patch.

tdipisa commented 3 years ago

@jusabatier I'm sorry but there is a PR connected to this issue that still need to be merged. Please let us close the issue as soon as we merge it.