[PATCH] (issue657) Prevent errornous recreation of usershape mapfile fragment
Wald Commits
scm-commit at wald.intevation.org
Thu Aug 15 13:35:22 CEST 2013
# HG changeset patch
# User Christian Lins <christian.lins at intevation.de>
# Date 1376566518 -7200
# Node ID 20f98087664d68b415c3dcb93b1d60dcdcc9c706
# Parent 4b7944c37c4f33cd33b0b52fcf6c85ce4f8f74ea
(issue657) Prevent errornous recreation of usershape mapfile fragment.
This is a hotfix for now to get at least barriers.zip working again.
diff -r 4b7944c37c4f -r 20f98087664d artifacts/src/main/java/org/dive4elements/river/exports/MapGenerator.java
--- a/artifacts/src/main/java/org/dive4elements/river/exports/MapGenerator.java Thu Aug 15 13:30:16 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/MapGenerator.java Thu Aug 15 13:35:18 2013 +0200
@@ -120,9 +120,11 @@
setInitialExtent(extent);
createWSPLGENLayer(flys, wms, attr);
}
- else if (FLOODMAP_USERSHAPE.equals(name)) {
- createUserShapeLayer(flys, wms);
- }
+ // FIXME: Already generated by HWSBarrierState
+ // wms has a wrong SRID which would break that layer
+ //else if (FLOODMAP_USERSHAPE.equals(name)) {
+ // createUserShapeLayer(flys, wms);
+ //}
else {
logger.debug("doOut: createDatabaseLayer for facet name: " + name);
createDatabaseLayer(flys, wms, attr);
diff -r 4b7944c37c4f -r 20f98087664d artifacts/src/main/java/org/dive4elements/river/utils/ArtifactMapfileGenerator.java
--- a/artifacts/src/main/java/org/dive4elements/river/utils/ArtifactMapfileGenerator.java Thu Aug 15 13:30:16 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/utils/ArtifactMapfileGenerator.java Thu Aug 15 13:35:18 2013 +0200
@@ -135,11 +135,11 @@
ShapefileReader sfr = new ShapefileReader(sf, true, false, null);
ShapefileHeader sfh = sfr.getHeader();
- String group = uuid + MS_USERSHAPE_PREFIX;
+ String group = MS_USERSHAPE_PREFIX + uuid;
String groupTitle = "I18N_USER_SHAPE_TITLE";
LayerInfo info = new LayerInfo();
- info.setName(MS_USERSHAPE_PREFIX + uuid);
+ info.setName(MS_LAYER_PREFIX + FloodMapState.WSPLGEN_USER_RGD + uuid);
if (sfh.getShapeType().isLineType()) {
info.setType("LINE");
}
@@ -156,7 +156,11 @@
info.setGroupTitle(groupTitle);
info.setSrid(wms.getSrid());
- String nameUser = MS_LAYER_PREFIX + wms.getName();
+ //String nameUser = MS_LAYER_PREFIX + wms.getName();
+ // TODO: This rewrites the user-rgd mapfile fragment generated by
+ // HWSBarrierState. Otherwise we would have to fragments with same
+ // layer name. Should be refactored...
+ String nameUser = MS_LAYER_PREFIX + "user-rgd";
Template tpl = getTemplateByName(SHP_LAYER_TEMPLATE);
if (tpl == null) {
More information about the Dive4elements-commits
mailing list