diff --git a/.travis.yml b/.travis.yml index 8f254ad78..87f237e25 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,7 @@ branches: only: - develop - master + - testing language: cpp @@ -25,6 +26,10 @@ matrix: - os: osx osx_image: xcode10.1 + addons: + homebrew: + packages: + - pango env: MINICONDA_FILE="Miniconda3-latest-MacOSX-x86_64.sh" @@ -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 @@ -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 diff --git a/VERSION.cmake b/VERSION.cmake index 2aba489e7..235545ce4 100644 --- a/VERSION.cmake +++ b/VERSION.cmake @@ -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 ) diff --git a/share/magics/10m/ne_10m_admin_1_states_provinces.VERSION.txt b/share/magics/10m/ne_10m_admin_1_states_provinces.VERSION.txt deleted file mode 100644 index 56fea8a08..000000000 --- a/share/magics/10m/ne_10m_admin_1_states_provinces.VERSION.txt +++ /dev/null @@ -1 +0,0 @@ -3.0.0 \ No newline at end of file diff --git a/share/magics/10m/ne_10m_admin_1_states_provinces.shp b/share/magics/10m/ne_10m_admin_1_states_provinces.shp deleted file mode 100644 index 75b2eb2ea..000000000 Binary files a/share/magics/10m/ne_10m_admin_1_states_provinces.shp and /dev/null differ diff --git a/share/magics/10m/ne_10m_admin_1_states_provinces.shx b/share/magics/10m/ne_10m_admin_1_states_provinces.shx deleted file mode 100644 index 667bb1472..000000000 Binary files a/share/magics/10m/ne_10m_admin_1_states_provinces.shx and /dev/null differ diff --git a/share/magics/10m/ne_10m_admin_1_states_provinces_lines.VERSION.txt b/share/magics/10m/ne_10m_admin_1_states_provinces_lines.VERSION.txt new file mode 100644 index 000000000..ee74734aa --- /dev/null +++ b/share/magics/10m/ne_10m_admin_1_states_provinces_lines.VERSION.txt @@ -0,0 +1 @@ +4.1.0 diff --git a/share/magics/10m/ne_10m_admin_1_states_provinces.dbf b/share/magics/10m/ne_10m_admin_1_states_provinces_lines.dbf similarity index 73% rename from share/magics/10m/ne_10m_admin_1_states_provinces.dbf rename to share/magics/10m/ne_10m_admin_1_states_provinces_lines.dbf index 281065f9d..0a43a9e7e 100644 Binary files a/share/magics/10m/ne_10m_admin_1_states_provinces.dbf and b/share/magics/10m/ne_10m_admin_1_states_provinces_lines.dbf differ diff --git a/share/magics/10m/ne_10m_admin_1_states_provinces.prj b/share/magics/10m/ne_10m_admin_1_states_provinces_lines.prj similarity index 100% rename from share/magics/10m/ne_10m_admin_1_states_provinces.prj rename to share/magics/10m/ne_10m_admin_1_states_provinces_lines.prj diff --git a/share/magics/10m/ne_10m_admin_1_states_provinces_lines.shp b/share/magics/10m/ne_10m_admin_1_states_provinces_lines.shp new file mode 100644 index 000000000..9b38a7aab Binary files /dev/null and b/share/magics/10m/ne_10m_admin_1_states_provinces_lines.shp differ diff --git a/share/magics/10m/ne_10m_admin_1_states_provinces_lines.shx b/share/magics/10m/ne_10m_admin_1_states_provinces_lines.shx new file mode 100644 index 000000000..a7494045b Binary files /dev/null and b/share/magics/10m/ne_10m_admin_1_states_provinces_lines.shx differ diff --git a/share/magics/110m/ne_110m_admin_1_states_provinces.VERSION.txt b/share/magics/110m/ne_110m_admin_1_states_provinces.VERSION.txt deleted file mode 100644 index 56fea8a08..000000000 --- a/share/magics/110m/ne_110m_admin_1_states_provinces.VERSION.txt +++ /dev/null @@ -1 +0,0 @@ -3.0.0 \ No newline at end of file diff --git a/share/magics/110m/ne_110m_admin_1_states_provinces.dbf b/share/magics/110m/ne_110m_admin_1_states_provinces.dbf deleted file mode 100755 index 3f246b6aa..000000000 Binary files a/share/magics/110m/ne_110m_admin_1_states_provinces.dbf and /dev/null differ diff --git a/share/magics/110m/ne_110m_admin_1_states_provinces.prj b/share/magics/110m/ne_110m_admin_1_states_provinces.prj deleted file mode 100755 index f45cbadf0..000000000 --- a/share/magics/110m/ne_110m_admin_1_states_provinces.prj +++ /dev/null @@ -1 +0,0 @@ -GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]] \ No newline at end of file diff --git a/share/magics/110m/ne_110m_admin_1_states_provinces.sbn b/share/magics/110m/ne_110m_admin_1_states_provinces.sbn deleted file mode 100644 index 7e8970ae9..000000000 Binary files a/share/magics/110m/ne_110m_admin_1_states_provinces.sbn and /dev/null differ diff --git a/share/magics/110m/ne_110m_admin_1_states_provinces.sbx b/share/magics/110m/ne_110m_admin_1_states_provinces.sbx deleted file mode 100644 index e915ffee8..000000000 Binary files a/share/magics/110m/ne_110m_admin_1_states_provinces.sbx and /dev/null differ diff --git a/share/magics/110m/ne_110m_admin_1_states_provinces.shp b/share/magics/110m/ne_110m_admin_1_states_provinces.shp deleted file mode 100755 index 92c85e7c1..000000000 Binary files a/share/magics/110m/ne_110m_admin_1_states_provinces.shp and /dev/null differ diff --git a/share/magics/110m/ne_110m_admin_1_states_provinces.shx b/share/magics/110m/ne_110m_admin_1_states_provinces.shx deleted file mode 100755 index 6576aee65..000000000 Binary files a/share/magics/110m/ne_110m_admin_1_states_provinces.shx and /dev/null differ diff --git a/share/magics/50m/ne_50m_admin_1_states_provinces_lines_shp.VERSION.txt b/share/magics/50m/ne_50m_admin_1_states_provinces_lines_shp.VERSION.txt deleted file mode 100644 index a2a5dfcc8..000000000 --- a/share/magics/50m/ne_50m_admin_1_states_provinces_lines_shp.VERSION.txt +++ /dev/null @@ -1 +0,0 @@ -2.0.0_rc2 \ No newline at end of file diff --git a/share/magics/50m/ne_50m_admin_1_states_provinces_lines_shp.dbf b/share/magics/50m/ne_50m_admin_1_states_provinces_lines_shp.dbf deleted file mode 100644 index b36577a50..000000000 Binary files a/share/magics/50m/ne_50m_admin_1_states_provinces_lines_shp.dbf and /dev/null differ diff --git a/share/magics/50m/ne_50m_admin_1_states_provinces_lines_shp.prj b/share/magics/50m/ne_50m_admin_1_states_provinces_lines_shp.prj deleted file mode 100644 index 4dcc58038..000000000 --- a/share/magics/50m/ne_50m_admin_1_states_provinces_lines_shp.prj +++ /dev/null @@ -1 +0,0 @@ -GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.017453292519943295],VERTCS["WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PARAMETER["Vertical_Shift",0.0],PARAMETER["Direction",1.0],UNIT["Meter",1.0]]] \ No newline at end of file diff --git a/share/magics/50m/ne_50m_admin_1_states_provinces_lines_shp.shp b/share/magics/50m/ne_50m_admin_1_states_provinces_lines_shp.shp deleted file mode 100644 index fbeac3c5f..000000000 Binary files a/share/magics/50m/ne_50m_admin_1_states_provinces_lines_shp.shp and /dev/null differ diff --git a/share/magics/50m/ne_50m_admin_1_states_provinces_lines_shp.shx b/share/magics/50m/ne_50m_admin_1_states_provinces_lines_shp.shx deleted file mode 100644 index 87ee522f9..000000000 Binary files a/share/magics/50m/ne_50m_admin_1_states_provinces_lines_shp.shx and /dev/null differ diff --git a/src/common/GeoRectangularProjection.cc b/src/common/GeoRectangularProjection.cc index 5053db4cd..8b28b770d 100644 --- a/src/common/GeoRectangularProjection.cc +++ b/src/common/GeoRectangularProjection.cc @@ -499,7 +499,7 @@ void GeoRectangularProjection::coastSetting(map& 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; diff --git a/src/common/PolarStereographicProjection.cc b/src/common/PolarStereographicProjection.cc index 9ee04633e..6518ebdcd 100644 --- a/src/common/PolarStereographicProjection.cc +++ b/src/common/PolarStereographicProjection.cc @@ -821,7 +821,7 @@ void PolarStereographicProjection::coastSetting(map& 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; diff --git a/src/common/Proj4Projection.cc b/src/common/Proj4Projection.cc index 7fe78a2b1..74bc53951 100644 --- a/src/common/Proj4Projection.cc +++ b/src/common/Proj4Projection.cc @@ -1180,10 +1180,10 @@ void Proj4Projection::coastSetting(map& 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, diff --git a/src/decoders/ShapeDecoder.cc b/src/decoders/ShapeDecoder.cc index e618e111b..4cbd8a5ec 100644 --- a/src/decoders/ShapeDecoder.cc +++ b/src/decoders/ShapeDecoder.cc @@ -130,6 +130,7 @@ void ShapeDecoder::customisedPoints(const std::set&, CustomisedPointsLis } /* + Read boundaries ... \sa Boundaries::operator() */ @@ -187,8 +188,18 @@ void ShapeDecoder::decode(const Transformation& transformation, const string& fi for (vector::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::iterator index_class = attributes.find("featurecla"); + string type = DBFReadStringAttribute(hDBF, i, index_class->second); + map::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; } } diff --git a/src/visualisers/CoastPlotting.cc b/src/visualisers/CoastPlotting.cc index fc83d5bb1..13c41db04 100644 --- a/src/visualisers/CoastPlotting.cc +++ b/src/visualisers/CoastPlotting.cc @@ -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")) { diff --git a/test/python/projection5.py b/test/python/projection5.py index 7b97ecedd..f7ea91baa 100644 --- a/test/python/projection5.py +++ b/test/python/projection5.py @@ -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)