Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into patch_ldap_spring
Browse files Browse the repository at this point in the history
  • Loading branch information
jusabatier committed Jan 9, 2025
2 parents 9cd87b1 + aeb0067 commit 84e55eb
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 11 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/cadastrapp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: "Checking out"
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: "Setting up Java"
uses: actions/setup-java@v1
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '17'

- name: "Maven repository caching"
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: cadastrapp-${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
Expand All @@ -37,7 +38,7 @@ jobs:
run: mkdir -p scratch && cp cadastrapp/target/georchestra-cadastrapp*.deb scratch/

- name: "publish deb as artifact"
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: cadastrapp.deb
path: scratch/
Expand All @@ -46,15 +47,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: "Checking out"
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: "Setting up Java"
uses: actions/setup-java@v1
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '17'

- name: "Maven repository caching"
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: cadastrapp-${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,16 +269,22 @@ public ResponseEntity<byte[]> createImageBordereauParcellaire(

logger.debug("Call WMS for cadastral background");
// Get cadastral background image with good BBOX
final String cadastralLayerWmsUrl = CadastrappPlaceHolder.getProperty("cadastre.wms.url");
String cadastralLayerWmsUrl = CadastrappPlaceHolder.getProperty("cadastre.wms.url");
final String cadastralLayerWmsUsername = CadastrappPlaceHolder.getProperty("cadastre.wms.username");
final String cadastralLayerWmsPassword = CadastrappPlaceHolder.getProperty("cadastre.wms.password");

// overriden by cadastrebpbg if defined - allows to use a different layer source url for backgrounds in BPs
if (CadastrappPlaceHolder.getProperty("cadastrebpbg.wms.url") != null && !CadastrappPlaceHolder.getProperty("cadastrebpbg.wms.url").isEmpty()) {
cadastralLayerWmsUrl = CadastrappPlaceHolder.getProperty("cadastrebpbg.wms.url");
}
WebMapServer wmsCadastralLayer = createWebMapServer(cadastralLayerWmsUrl,cadastralLayerWmsUsername, cadastralLayerWmsPassword );

final String cadastralLayerName = CadastrappPlaceHolder.getProperty("cadastre.wms.layer.name");
String cadastralLayerName = CadastrappPlaceHolder.getProperty("cadastre.wms.layer.name");
final String cadastreSRS = CadastrappPlaceHolder.getProperty("cadastre.SRS");
final String cadastralLayerFormat = CadastrappPlaceHolder.getProperty("cadastre.format");

// overriden by cadastrebpbg if defined - allows to use a different layer name for backgrounds in BPs
if (CadastrappPlaceHolder.getProperty("cadastrebpbg.wms.layer.name") != null && !CadastrappPlaceHolder.getProperty("cadastrebpbg.wms.layer.name").isEmpty()) {
cadastralLayerName = CadastrappPlaceHolder.getProperty("cadastrebpbg.wms.layer.name");
}
GetMapRequest requestCadastralLayer = createAndConfigureMapRequest(wmsCadastralLayer, cadastralLayerFormat, cadastralLayerName, pdfImagePixelSize, cadastreSRS, bounds);

logger.debug("Create background cadastral image");
Expand Down
5 changes: 5 additions & 0 deletions cadastrapp/src/main/resources/cadastrapp.properties
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,11 @@ cadastre.wms.layer.name=qgis:geo_parcelle
cadastre.wms.username=
cadastre.wms.password=

#if defined, used instead of cadastre.wms for the background layer in BP
#useful of cadastre.wms points at a cached layer and you want a different layer without resampling for BPs.
#cadastrebpbg.wms.url=https://georchestra.example.org/geoserver/wms
#cadastrebpbg.wms.layer.name=qgis:geo_parcelle

# Here you can configure the layer used to generate the plot selection on BP
# let it empty if cadastre.wms.url support SLD_BODY WMS param
# Note that it must support SLD_BODY WMS param
Expand Down

0 comments on commit 84e55eb

Please sign in to comment.