Skip to content

Commit

Permalink
Merge pull request #141 in MAG/magics from release/4.2.3 to develop
Browse files Browse the repository at this point in the history
* commit '2c156ba29ed40f88997aa07a84460070bb1a6c16':
  ADMIN1 BOUNDARIES - only plot regions in Italy MAGP-1214
  Qt driver: add flag to control if a pen is used for text rendering MAGP-1219
  Updating version to 4.2.3
  Updating travis plan
  Update .travis.yml
  Fixing Bug with Wind plotting [SD-27635]
  Fix Issues with the CDF graph
  Fix Severe clipping issues [SD-27045] [MAGP-1216] [CDS]
  dding test
  Adding the possibility to add legend parameters in the style definition
  Fix for Windows build
  Fix for Windows build
  Lambert failing to check later
  • Loading branch information
sylvielamythepaut committed Nov 27, 2019
2 parents 04368c9 + 2c156ba commit 1ccc53e
Show file tree
Hide file tree
Showing 28 changed files with 30 additions and 16 deletions.
9 changes: 8 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ branches:
only:
- develop
- master
- testing

language: cpp

Expand All @@ -25,6 +26,10 @@ matrix:

- os: osx
osx_image: xcode10.1
addons:
homebrew:
packages:
- pango

env:
MINICONDA_FILE="Miniconda3-latest-MacOSX-x86_64.sh"
Expand All @@ -34,6 +39,7 @@ env:
- MAGICS_SRC=${TRAVIS_BUILD_DIR}
- MAGICS_PYTHON_TESTS=${MAGICS_SRC}/test/python
- MAGICS_PYTHON_SRC=${MAGICS_SRC}/../magics-python
- MAGICS_TEST_SRC=${MAGICS_SRC}/../magics-python
- ECBUILD_SRC=${MAGICS_SRC}/../ecbuild
- BUILD_DIR=${MAGICS_SRC}/build
- INSTALL_DIR=/tmp/install
Expand Down Expand Up @@ -65,9 +71,10 @@ install:
- git clone --depth 1 https://github.com/ecmwf/ecbuild.git ${ECBUILD_SRC}
# install magics-python source
- git clone -b develop --depth 1 https://github.com/ecmwf/magics-python.git ${MAGICS_PYTHON_SRC}

# install conda deps
- conda install boost libnetcdf expat jinja2 xarray scipy cftime
- conda install -c conda-forge proj4=5 eccodes pytest cairo pango
- conda install -c conda-forge proj4=5 eccodes pytest cairo pango pip
# search for conda-installed libraries
- |
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
Expand Down
4 changes: 2 additions & 2 deletions VERSION.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
# does it submit to any jurisdiction.


set ( metabuilder_version 4.2.3.1 )
set ( _version 4.2.3.1 )
set ( metabuilder_version 4.2.3 )
set ( _version 4.2.3 )


if ( MAGICS_BUILD )
Expand Down

This file was deleted.

Binary file removed share/magics/10m/ne_10m_admin_1_states_provinces.shp
Binary file not shown.
Binary file removed share/magics/10m/ne_10m_admin_1_states_provinces.shx
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4.1.0
Binary file not shown.
Binary file not shown.
Binary file not shown.

This file was deleted.

Binary file not shown.
1 change: 0 additions & 1 deletion share/magics/110m/ne_110m_admin_1_states_provinces.prj

This file was deleted.

Binary file removed share/magics/110m/ne_110m_admin_1_states_provinces.sbn
Binary file not shown.
Binary file removed share/magics/110m/ne_110m_admin_1_states_provinces.sbx
Binary file not shown.
Binary file not shown.
Binary file removed share/magics/110m/ne_110m_admin_1_states_provinces.shx
Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion src/common/GeoRectangularProjection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ void GeoRectangularProjection::coastSetting(map<string, string>& setting, double
setting["boundaries"] = resol + "/ne_" + resol + "_admin_0_boundary_lines_land";

//! \note Administraive borders hardcoded to 10m resolution (low res version do not contain all info)
setting["administrative_boundaries"] = "10m/ne_10m_admin_1_states_provinces";
setting["administrative_boundaries"] = "10m/ne_10m_admin_1_states_provinces_lines";

MagLog::dev() << "GeoRectangularProjection::coastSetting[" << abswidth << ", " << absheight << "]->" << ratio
<< " resol: " << resol << endl;
Expand Down
2 changes: 1 addition & 1 deletion src/common/PolarStereographicProjection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,7 @@ void PolarStereographicProjection::coastSetting(map<string, string>& setting, do
setting["boundaries"] = resol + "/ne_" + resol + "_admin_0_boundary_lines_land";

//! \note Administraive borders hardcoded to 10m resolution (low res version do not contain all info)
setting["administrative_boundaries"] = "10m/ne_10m_admin_1_states_provinces";
setting["administrative_boundaries"] = "10m/ne_10m_admin_1_states_provinces_lines";

MagLog::dev() << "GeoRectangularProjection::coastSetting[" << abswidth << ", " << absheight << "]->" << ratio
<< " resol: " << resol << endl;
Expand Down
4 changes: 2 additions & 2 deletions src/common/Proj4Projection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1180,10 +1180,10 @@ void Proj4Projection::coastSetting(map<string, string>& setting, double abswidth
setting["coast"] = resol + "/ne_" + resol + "_coastline";
setting["rivers"] = resol + "/ne_" + resol + "_rivers_lake_centerlines";
setting["boundaries"] = resol + "/ne_" + resol + "_admin_0_boundary_lines_land";
setting["administrative_boundaries"] = resol + "/ne_" + resol + "_admin_1_states_provinces";
// setting["administrative_boundaries"] = resol + "/ne_" + resol + "_admin_1_states_provinces";

//! \note Administraive borders hardcoded to 10m resolution (low res version do not contain all info)
setting["administrative_boundaries"] = "10m/ne_10m_admin_1_states_provinces";
setting["administrative_boundaries"] = "10m/ne_10m_admin_1_states_provinces_lines";
}

void Proj4Projection::visit(MetaDataVisitor& visitor, double left, double top, double width, double height,
Expand Down
15 changes: 13 additions & 2 deletions src/decoders/ShapeDecoder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ void ShapeDecoder::customisedPoints(const std::set<string>&, CustomisedPointsLis
}

/*
Read boundaries ...
\sa Boundaries::operator()
*/
Expand Down Expand Up @@ -187,8 +188,18 @@ void ShapeDecoder::decode(const Transformation& transformation, const string& fi
for (vector<string>::const_iterator val = values.begin(); val != values.end(); ++val) {
string ss = s.substr(0, val->length());
if (magCompare(*val, ss)) {
add = true;
MagLog::debug() << "Found " << ss << endl;
if (magCompare(ss,"ITA")) {
MagLog::debug() << "Enter special case for regions in Italy MAGP-1214" << endl;
map<string, int>::iterator index_class = attributes.find("featurecla");
string type = DBFReadStringAttribute(hDBF, i, index_class->second);
map<string, int>::iterator index = filter.empty() ? attributes.end() : attributes.find(filter);
if(magCompare(type,"Admin-1 boundary")){
add = false;
}
else add = true;
}
else add = true;
// MagLog::debug() << "Found " << ss << endl;
break;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/visualisers/CoastPlotting.cc
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ void CoastPlotting::operator()(DrawingVisitor& parent) {
coast_.clear();
ocean_.clear();

coastSet_["administrative_boundaries"] = "10m/ne_10m_admin_1_states_provinces";
coastSet_["administrative_boundaries"] = "10m/ne_10m_admin_1_states_provinces_lines";

if (magCompare(NoCoastPlottingAttributes::resolution_, "high") ||
magCompare(NoCoastPlottingAttributes::resolution_, "full")) {
Expand Down
2 changes: 1 addition & 1 deletion test/python/projection5.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
text_lines = [projection["text"]])

# Plot the result
plot(output, map, coast, text)
plot(output, coast, text)

# For documentation purposes
tofortran(projection["name"], output, map, coast, text)
Expand Down

0 comments on commit 1ccc53e

Please sign in to comment.