branch feature/6944 updated (05de7fb -> 734d720)
This is an automated email from the git hooks/post-receive script. New change to branch feature/6944 in repository observe. See http://git.codelutin.com/observe.git from 05de7fb zoom (or un-zoom) on pointer new 644cbb7 add layers new 734d720 fix zoom The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit 734d7206ef7d3b807397449ad1bc62f7869adb1b Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Fri Apr 17 17:35:08 2015 +0200 fix zoom commit 644cbb7c02420d73bb175ef56b337b82bb2aefb8 Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Fri Apr 17 17:31:40 2015 +0200 add layers Summary of changes: .../java/fr/ird/observe/ObserveConfigOption.java | 10 +-- .../ui/content/open/impl/seine/TripMapHandler.java | 25 ++++--- .../map/shapeFiles/borders/WDBII_border_l_L1.dbf | Bin 0 -> 40956 bytes .../map/shapeFiles/borders/WDBII_border_l_L1.prj | 1 + .../map/shapeFiles/borders/WDBII_border_l_L1.shp | Bin 0 -> 139420 bytes .../map/shapeFiles/borders/WDBII_border_l_L1.shx | Bin 0 -> 3692 bytes .../map/shapeFiles/continents/GSHHS_l_L1.dbf | Bin 0 -> 1227230 bytes .../map/shapeFiles/continents/GSHHS_l_L1.prj | 1 + .../map/shapeFiles/continents/GSHHS_l_L1.shp | Bin 0 -> 1221404 bytes .../map/shapeFiles/continents/GSHHS_l_L1.shx | Bin 0 -> 45756 bytes .../map/shapeFiles/continents/GSHHS_l_L6.dbf | Bin 0 -> 20435 bytes .../map/shapeFiles/continents/GSHHS_l_L6.prj | 1 + .../map/shapeFiles/continents/GSHHS_l_L6.shp | Bin 0 -> 48740 bytes .../map/shapeFiles/continents/GSHHS_l_L6.shx | Bin 0 -> 852 bytes .../map/shapeFiles/lakesAndSeas/GSHHS_l_L2.dbf | Bin 0 -> 939130 bytes .../map/shapeFiles/lakesAndSeas/GSHHS_l_L2.prj | 1 + .../map/shapeFiles/lakesAndSeas/GSHHS_l_L2.shp | Bin 0 -> 721340 bytes .../map/shapeFiles/lakesAndSeas/GSHHS_l_L2.shx | Bin 0 -> 35036 bytes observe-swing/src/main/resources/map/style.xml | 77 +++++++++++++++++++++ 19 files changed, 103 insertions(+), 13 deletions(-) create mode 100644 observe-swing/src/main/resources/map/shapeFiles/borders/WDBII_border_l_L1.dbf create mode 100644 observe-swing/src/main/resources/map/shapeFiles/borders/WDBII_border_l_L1.prj create mode 100644 observe-swing/src/main/resources/map/shapeFiles/borders/WDBII_border_l_L1.shp create mode 100644 observe-swing/src/main/resources/map/shapeFiles/borders/WDBII_border_l_L1.shx create mode 100644 observe-swing/src/main/resources/map/shapeFiles/continents/GSHHS_l_L1.dbf create mode 100644 observe-swing/src/main/resources/map/shapeFiles/continents/GSHHS_l_L1.prj create mode 100644 observe-swing/src/main/resources/map/shapeFiles/continents/GSHHS_l_L1.shp create mode 100644 observe-swing/src/main/resources/map/shapeFiles/continents/GSHHS_l_L1.shx create mode 100644 observe-swing/src/main/resources/map/shapeFiles/continents/GSHHS_l_L6.dbf create mode 100644 observe-swing/src/main/resources/map/shapeFiles/continents/GSHHS_l_L6.prj create mode 100644 observe-swing/src/main/resources/map/shapeFiles/continents/GSHHS_l_L6.shp create mode 100644 observe-swing/src/main/resources/map/shapeFiles/continents/GSHHS_l_L6.shx create mode 100644 observe-swing/src/main/resources/map/shapeFiles/lakesAndSeas/GSHHS_l_L2.dbf create mode 100644 observe-swing/src/main/resources/map/shapeFiles/lakesAndSeas/GSHHS_l_L2.prj create mode 100644 observe-swing/src/main/resources/map/shapeFiles/lakesAndSeas/GSHHS_l_L2.shp create mode 100644 observe-swing/src/main/resources/map/shapeFiles/lakesAndSeas/GSHHS_l_L2.shx -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@list.forge.codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/6944 in repository observe. See http://git.codelutin.com/observe.git commit 644cbb7c02420d73bb175ef56b337b82bb2aefb8 Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Fri Apr 17 17:31:40 2015 +0200 add layers --- .../java/fr/ird/observe/ObserveConfigOption.java | 10 +-- .../ui/content/open/impl/seine/TripMapHandler.java | 20 ++++-- .../map/shapeFiles/borders/WDBII_border_l_L1.dbf | Bin 0 -> 40956 bytes .../map/shapeFiles/borders/WDBII_border_l_L1.prj | 1 + .../map/shapeFiles/borders/WDBII_border_l_L1.shp | Bin 0 -> 139420 bytes .../map/shapeFiles/borders/WDBII_border_l_L1.shx | Bin 0 -> 3692 bytes .../map/shapeFiles/continents/GSHHS_l_L1.dbf | Bin 0 -> 1227230 bytes .../map/shapeFiles/continents/GSHHS_l_L1.prj | 1 + .../map/shapeFiles/continents/GSHHS_l_L1.shp | Bin 0 -> 1221404 bytes .../map/shapeFiles/continents/GSHHS_l_L1.shx | Bin 0 -> 45756 bytes .../map/shapeFiles/continents/GSHHS_l_L6.dbf | Bin 0 -> 20435 bytes .../map/shapeFiles/continents/GSHHS_l_L6.prj | 1 + .../map/shapeFiles/continents/GSHHS_l_L6.shp | Bin 0 -> 48740 bytes .../map/shapeFiles/continents/GSHHS_l_L6.shx | Bin 0 -> 852 bytes .../map/shapeFiles/lakesAndSeas/GSHHS_l_L2.dbf | Bin 0 -> 939130 bytes .../map/shapeFiles/lakesAndSeas/GSHHS_l_L2.prj | 1 + .../map/shapeFiles/lakesAndSeas/GSHHS_l_L2.shp | Bin 0 -> 721340 bytes .../map/shapeFiles/lakesAndSeas/GSHHS_l_L2.shx | Bin 0 -> 35036 bytes observe-swing/src/main/resources/map/style.xml | 77 +++++++++++++++++++++ 19 files changed, 101 insertions(+), 10 deletions(-) diff --git a/observe-swing/src/main/java/fr/ird/observe/ObserveConfigOption.java b/observe-swing/src/main/java/fr/ird/observe/ObserveConfigOption.java index 27731d2..c89cd3a 100644 --- a/observe-swing/src/main/java/fr/ird/observe/ObserveConfigOption.java +++ b/observe-swing/src/main/java/fr/ird/observe/ObserveConfigOption.java @@ -630,7 +630,7 @@ public enum ObserveConfigOption implements ConfigOptionDef { MAP_LAYER_1( "map.layer1.path", n("observe.config.map.layer1.description"), - "${user.home}/.observe/map/shapeFiles/zee/World_EEZ_v8_2014.shp", + "${user.home}/.observe/map/shapeFiles/continents/GSHHS_l_L1.shp", File.class, false, false @@ -639,7 +639,7 @@ public enum ObserveConfigOption implements ConfigOptionDef { MAP_LAYER_2( "map.layer2.path", n("observe.config.map.layer2.description"), - null, + "${user.home}/.observe/map/shapeFiles/continents/GSHHS_l_L6.shp", File.class, false, false @@ -648,7 +648,7 @@ public enum ObserveConfigOption implements ConfigOptionDef { MAP_LAYER_3( "map.layer3.path", n("observe.config.map.layer3.description"), - null, + "${user.home}/.observe/map/shapeFiles/lakesAndSeas/GSHHS_l_L2.shp", File.class, false, false @@ -657,7 +657,7 @@ public enum ObserveConfigOption implements ConfigOptionDef { MAP_LAYER_4( "map.layer4.path", n("observe.config.map.layer4.description"), - null, + "${user.home}/.observe/map/shapeFiles/borders/WDBII_border_l_L1.shp", File.class, false, false @@ -666,7 +666,7 @@ public enum ObserveConfigOption implements ConfigOptionDef { MAP_LAYER_5( "map.layer5.path", n("observe.config.map.layer5.description"), - null, + "${user.home}/.observe/map/shapeFiles/zee/World_EEZ_v8_2014.shp", File.class, false, false diff --git a/observe-swing/src/main/java/fr/ird/observe/ui/content/open/impl/seine/TripMapHandler.java b/observe-swing/src/main/java/fr/ird/observe/ui/content/open/impl/seine/TripMapHandler.java index 1903519..a8ec791 100644 --- a/observe-swing/src/main/java/fr/ird/observe/ui/content/open/impl/seine/TripMapHandler.java +++ b/observe-swing/src/main/java/fr/ird/observe/ui/content/open/impl/seine/TripMapHandler.java @@ -118,17 +118,19 @@ public class TripMapHandler { try { mapContent = new MapContent(); - mapContent.setTitle("Un titre"); + + StyledLayerDescriptor styledLayerDescriptor = importStyledLayerDescriptor(); + for (File layerFile : config.getMapLayerFiles()) { FileDataStore store = FileDataStoreFinder.getDataStore(layerFile); SimpleFeatureSource featureSource = store.getFeatureSource(); Style style = SLD.createSimpleStyle(featureSource.getSchema()); + style = findStyle(styledLayerDescriptor, store.getNames().get(0).getLocalPart(), null, style); Layer layer = new FeatureLayer(featureSource, style); mapContent.addLayer(layer); } - StyledLayerDescriptor styledLayerDescriptor = importStyledLayerDescriptor(); SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy"); GeometryFactory geometryFactory = JTSFactoryFinder.getGeometryFactory(); @@ -264,7 +266,7 @@ public class TripMapHandler { return styledLayerDescriptor; } - protected Style findStyle(StyledLayerDescriptor styledLayerDescriptor, final String layerName, String styleName) throws Exception { + protected Style findStyle(StyledLayerDescriptor styledLayerDescriptor, final String layerName, String styleName, Style defaultStyle) { Optional<StyledLayer> styledLayerOptional = Iterables.tryFind(styledLayerDescriptor.layers(), new Predicate<StyledLayer>() { @Override @@ -273,7 +275,7 @@ public class TripMapHandler { } }); - Style style = null; + Style style = defaultStyle; if (styledLayerOptional.isPresent()) { @@ -308,11 +310,19 @@ public class TripMapHandler { } } + return style; + + } + + protected Style findStyle(StyledLayerDescriptor styledLayerDescriptor, final String layerName, String styleName) throws Exception { + + Style style = findStyle(styledLayerDescriptor, layerName, styleName, null); + if (style == null) { throw new Exception(String.format("No style found for layer name '%s' and style name '%s'", layerName, styleName)); } - return style; + } diff --git a/observe-swing/src/main/resources/map/shapeFiles/borders/WDBII_border_l_L1.dbf b/observe-swing/src/main/resources/map/shapeFiles/borders/WDBII_border_l_L1.dbf new file mode 100644 index 0000000..4fa0d6e Binary files /dev/null and b/observe-swing/src/main/resources/map/shapeFiles/borders/WDBII_border_l_L1.dbf differ diff --git a/observe-swing/src/main/resources/map/shapeFiles/borders/WDBII_border_l_L1.prj b/observe-swing/src/main/resources/map/shapeFiles/borders/WDBII_border_l_L1.prj new file mode 100644 index 0000000..a30c00a --- /dev/null +++ b/observe-swing/src/main/resources/map/shapeFiles/borders/WDBII_border_l_L1.prj @@ -0,0 +1 @@ +GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] \ No newline at end of file diff --git a/observe-swing/src/main/resources/map/shapeFiles/borders/WDBII_border_l_L1.shp b/observe-swing/src/main/resources/map/shapeFiles/borders/WDBII_border_l_L1.shp new file mode 100644 index 0000000..33bbcc9 Binary files /dev/null and b/observe-swing/src/main/resources/map/shapeFiles/borders/WDBII_border_l_L1.shp differ diff --git a/observe-swing/src/main/resources/map/shapeFiles/borders/WDBII_border_l_L1.shx b/observe-swing/src/main/resources/map/shapeFiles/borders/WDBII_border_l_L1.shx new file mode 100644 index 0000000..cda0c4d Binary files /dev/null and b/observe-swing/src/main/resources/map/shapeFiles/borders/WDBII_border_l_L1.shx differ diff --git a/observe-swing/src/main/resources/map/shapeFiles/continents/GSHHS_l_L1.dbf b/observe-swing/src/main/resources/map/shapeFiles/continents/GSHHS_l_L1.dbf new file mode 100644 index 0000000..6d95d62 Binary files /dev/null and b/observe-swing/src/main/resources/map/shapeFiles/continents/GSHHS_l_L1.dbf differ diff --git a/observe-swing/src/main/resources/map/shapeFiles/continents/GSHHS_l_L1.prj b/observe-swing/src/main/resources/map/shapeFiles/continents/GSHHS_l_L1.prj new file mode 100644 index 0000000..a30c00a --- /dev/null +++ b/observe-swing/src/main/resources/map/shapeFiles/continents/GSHHS_l_L1.prj @@ -0,0 +1 @@ +GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] \ No newline at end of file diff --git a/observe-swing/src/main/resources/map/shapeFiles/continents/GSHHS_l_L1.shp b/observe-swing/src/main/resources/map/shapeFiles/continents/GSHHS_l_L1.shp new file mode 100644 index 0000000..6f54bb2 Binary files /dev/null and b/observe-swing/src/main/resources/map/shapeFiles/continents/GSHHS_l_L1.shp differ diff --git a/observe-swing/src/main/resources/map/shapeFiles/continents/GSHHS_l_L1.shx b/observe-swing/src/main/resources/map/shapeFiles/continents/GSHHS_l_L1.shx new file mode 100644 index 0000000..4dd1077 Binary files /dev/null and b/observe-swing/src/main/resources/map/shapeFiles/continents/GSHHS_l_L1.shx differ diff --git a/observe-swing/src/main/resources/map/shapeFiles/continents/GSHHS_l_L6.dbf b/observe-swing/src/main/resources/map/shapeFiles/continents/GSHHS_l_L6.dbf new file mode 100644 index 0000000..5c3e8dd Binary files /dev/null and b/observe-swing/src/main/resources/map/shapeFiles/continents/GSHHS_l_L6.dbf differ diff --git a/observe-swing/src/main/resources/map/shapeFiles/continents/GSHHS_l_L6.prj b/observe-swing/src/main/resources/map/shapeFiles/continents/GSHHS_l_L6.prj new file mode 100644 index 0000000..a30c00a --- /dev/null +++ b/observe-swing/src/main/resources/map/shapeFiles/continents/GSHHS_l_L6.prj @@ -0,0 +1 @@ +GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] \ No newline at end of file diff --git a/observe-swing/src/main/resources/map/shapeFiles/continents/GSHHS_l_L6.shp b/observe-swing/src/main/resources/map/shapeFiles/continents/GSHHS_l_L6.shp new file mode 100644 index 0000000..d119232 Binary files /dev/null and b/observe-swing/src/main/resources/map/shapeFiles/continents/GSHHS_l_L6.shp differ diff --git a/observe-swing/src/main/resources/map/shapeFiles/continents/GSHHS_l_L6.shx b/observe-swing/src/main/resources/map/shapeFiles/continents/GSHHS_l_L6.shx new file mode 100644 index 0000000..415ee7e Binary files /dev/null and b/observe-swing/src/main/resources/map/shapeFiles/continents/GSHHS_l_L6.shx differ diff --git a/observe-swing/src/main/resources/map/shapeFiles/lakesAndSeas/GSHHS_l_L2.dbf b/observe-swing/src/main/resources/map/shapeFiles/lakesAndSeas/GSHHS_l_L2.dbf new file mode 100644 index 0000000..367eeac Binary files /dev/null and b/observe-swing/src/main/resources/map/shapeFiles/lakesAndSeas/GSHHS_l_L2.dbf differ diff --git a/observe-swing/src/main/resources/map/shapeFiles/lakesAndSeas/GSHHS_l_L2.prj b/observe-swing/src/main/resources/map/shapeFiles/lakesAndSeas/GSHHS_l_L2.prj new file mode 100644 index 0000000..a30c00a --- /dev/null +++ b/observe-swing/src/main/resources/map/shapeFiles/lakesAndSeas/GSHHS_l_L2.prj @@ -0,0 +1 @@ +GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] \ No newline at end of file diff --git a/observe-swing/src/main/resources/map/shapeFiles/lakesAndSeas/GSHHS_l_L2.shp b/observe-swing/src/main/resources/map/shapeFiles/lakesAndSeas/GSHHS_l_L2.shp new file mode 100644 index 0000000..4831eb7 Binary files /dev/null and b/observe-swing/src/main/resources/map/shapeFiles/lakesAndSeas/GSHHS_l_L2.shp differ diff --git a/observe-swing/src/main/resources/map/shapeFiles/lakesAndSeas/GSHHS_l_L2.shx b/observe-swing/src/main/resources/map/shapeFiles/lakesAndSeas/GSHHS_l_L2.shx new file mode 100644 index 0000000..0a76b84 Binary files /dev/null and b/observe-swing/src/main/resources/map/shapeFiles/lakesAndSeas/GSHHS_l_L2.shx differ diff --git a/observe-swing/src/main/resources/map/style.xml b/observe-swing/src/main/resources/map/style.xml index b04fa28..a42c641 100644 --- a/observe-swing/src/main/resources/map/style.xml +++ b/observe-swing/src/main/resources/map/style.xml @@ -123,4 +123,81 @@ </FeatureTypeStyle> </UserStyle> </NamedLayer> + + <NamedLayer> + <Name>World_EEZ_v8_2014</Name> + <UserStyle> + <FeatureTypeStyle> + <Rule> + <PolygonSymbolizer> + <Fill> + <CssParameter name="fill">#82F4F9</CssParameter> + </Fill> + <Stroke> + <CssParameter name="stroke">#000000</CssParameter> + <CssParameter name="stroke-width">1</CssParameter> + </Stroke> + </PolygonSymbolizer> + </Rule> + </FeatureTypeStyle> + </UserStyle> + </NamedLayer> + + <NamedLayer> + <Name>GSHHS_l_L1</Name> + <UserStyle> + <FeatureTypeStyle> + <Rule> + <PolygonSymbolizer> + <Fill> + <CssParameter name="fill">#FBE9D7</CssParameter> + </Fill> + <Stroke> + <CssParameter name="stroke">#000000</CssParameter> + <CssParameter name="stroke-width">1</CssParameter> + </Stroke> + </PolygonSymbolizer> + </Rule> + </FeatureTypeStyle> + </UserStyle> + </NamedLayer> + + <NamedLayer> + <Name>GSHHS_l_L6</Name> + <UserStyle> + <FeatureTypeStyle> + <Rule> + <PolygonSymbolizer> + <Fill> + <CssParameter name="fill">#F5F5FF</CssParameter> + </Fill> + <Stroke> + <CssParameter name="stroke">#000000</CssParameter> + <CssParameter name="stroke-width">1</CssParameter> + </Stroke> + </PolygonSymbolizer> + </Rule> + </FeatureTypeStyle> + </UserStyle> + </NamedLayer> + + <NamedLayer> + <Name>GSHHS_l_L2</Name> + <UserStyle> + <FeatureTypeStyle> + <Rule> + <PolygonSymbolizer> + <Fill> + <CssParameter name="fill">#7FB7FF</CssParameter> + </Fill> + <Stroke> + <CssParameter name="stroke">#7FB7FF</CssParameter> + <CssParameter name="stroke-width">1</CssParameter> + </Stroke> + </PolygonSymbolizer> + </Rule> + </FeatureTypeStyle> + </UserStyle> + </NamedLayer> + </StyledLayerDescriptor> \ No newline at end of file -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@list.forge.codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/6944 in repository observe. See http://git.codelutin.com/observe.git commit 734d7206ef7d3b807397449ad1bc62f7869adb1b Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Fri Apr 17 17:35:08 2015 +0200 fix zoom --- .../fr/ird/observe/ui/content/open/impl/seine/TripMapHandler.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/observe-swing/src/main/java/fr/ird/observe/ui/content/open/impl/seine/TripMapHandler.java b/observe-swing/src/main/java/fr/ird/observe/ui/content/open/impl/seine/TripMapHandler.java index a8ec791..ca8a3f8 100644 --- a/observe-swing/src/main/java/fr/ird/observe/ui/content/open/impl/seine/TripMapHandler.java +++ b/observe-swing/src/main/java/fr/ird/observe/ui/content/open/impl/seine/TripMapHandler.java @@ -331,11 +331,10 @@ public class TripMapHandler { @Override public void mouseWheelMoved(MouseWheelEvent e) { int notches = e.getWheelRotation(); - double scale = notches; ReferencedEnvelope displayArea = tripMapUI.getDisplayArea(); - double deltaWidth = displayArea.getWidth() * notches * ZOOM_STEP_RATIO; - double deltaHeight = displayArea.getHeight() * notches * ZOOM_STEP_RATIO; + double deltaWidth = displayArea.getWidth() * notches * ZOOM_STEP_RATIO * -1; + double deltaHeight = displayArea.getHeight() * notches * ZOOM_STEP_RATIO * -1; double ratioLeft = e.getX() * 1d / tripMapUI.getWidth(); -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@list.forge.codelutin.com>.
participants (1)
-
codelutin.com scm