[Git][debian-gis-team/proj][upstream] New upstream version 6.1.0~rc3
Bas Couwenberg
gitlab at salsa.debian.org
Fri May 10 14:30:57 BST 2019
Bas Couwenberg pushed to branch upstream at Debian GIS Project / proj
Commits:
5e3412f5 by Bas Couwenberg at 2019-05-10T12:50:35Z
New upstream version 6.1.0~rc3
- - - - -
8 changed files:
- NEWS
- data/sql/grid_alternatives.sql
- data/sql/grid_transformation.sql
- data/sql/helmert_transformation.sql
- data/sql/metadata.sql
- src/iso19111/c_api.cpp
- src/release.cpp
- test/unit/test_c_api.cpp
Changes:
=====================================
NEWS
=====================================
@@ -14,7 +14,7 @@
o Update internal version of googletest to v1.8.1 (#1361)
- o Database update: EPSG v9.6.1, IGNF v3.0.3, ESRI 10.7.0
+ o Database update: EPSG v9.6.2 (#1462), IGNF v3.0.3, ESRI 10.7.0
and add operation_version column (#1368)
o Add proj_normalize_for_visualization() that attempts to apply axis
=====================================
data/sql/grid_alternatives.sql
=====================================
@@ -836,3 +836,20 @@ INSERT INTO grid_alternatives(original_grid_name,
1, -- direct download
0, -- non-freely licensed. See https://salsa.debian.org/debian-gis-team/proj-rdnap/raw/master/debian/copyright
NULL);
+
+-- Belgium
+
+INSERT INTO grid_alternatives(original_grid_name,
+ proj_grid_name,
+ proj_grid_format,
+ proj_method,
+ inverse_direction,
+ package_name,
+ url, direct_download, open_license, directory)
+ VALUES ('bd72lb72_etrs89lb08.gsb',
+ 'bd72lb72_etrs89lb08.gsb',
+ 'NTv2',
+ 'hgridshift',
+ 0,
+ 'proj-datumgrid-europe',
+ NULL, NULL, NULL, NULL);
=====================================
data/sql/grid_transformation.sql
=====================================
@@ -256,8 +256,8 @@ INSERT INTO "grid_transformation" VALUES('EPSG','8364','S-JTSK [JTSK03] to S-JTS
INSERT INTO "grid_transformation" VALUES('EPSG','8369','BD72 to ETRS89 (3)',NULL,NULL,'EPSG','9615','NTv2','EPSG','4313','EPSG','4258','EPSG','1347',0.01,'EPSG','8656','Latitude and longitude difference file','bd72lb72_etrs89lb08.gsb',NULL,NULL,NULL,NULL,NULL,NULL,'IGN-Bel 0.01m',0);
INSERT INTO "grid_transformation" VALUES('EPSG','8371','RGF93 to NGF IGN69 height (2)',NULL,NULL,'EPSG','1073','Geographic3D to GravityRelatedHeight (IGN2009)','EPSG','4965','EPSG','5720','EPSG','1326',0.02,'EPSG','8666','Geoid (height correction) model file','RAF09.mnt',NULL,NULL,NULL,NULL,NULL,NULL,'IGN Fra 09',0);
INSERT INTO "grid_transformation" VALUES('EPSG','8372','RGF93 to IGN78 Corsica height (2)',NULL,NULL,'EPSG','1073','Geographic3D to GravityRelatedHeight (IGN2009)','EPSG','4965','EPSG','5721','EPSG','1327',0.05,'EPSG','8666','Geoid (height correction) model file','RAC09.mnt',NULL,NULL,NULL,NULL,NULL,NULL,'IGN Fra Cor 09',0);
-INSERT INTO "grid_transformation" VALUES('EPSG','8444','GDA94 to GDA2020 (4)',NULL,NULL,'EPSG','9615','NTv2','EPSG','4283','EPSG','7844','EPSG','4169',0.05,'EPSG','8656','Latitude and longitude difference file','XMAS_C_V1.gsb',NULL,NULL,NULL,NULL,NULL,NULL,'ICSM-Cxr CI Conf',0);
-INSERT INTO "grid_transformation" VALUES('EPSG','8445','GDA94 to GDA2020 (5)',NULL,NULL,'EPSG','9615','NTv2','EPSG','4283','EPSG','7844','EPSG','1069',0.05,'EPSG','8656','Latitude and longitude difference file','COCOS_C_V1.gsb',NULL,NULL,NULL,NULL,NULL,NULL,'ICSM-Cki Conf',0);
+INSERT INTO "grid_transformation" VALUES('EPSG','8444','GDA94 to GDA2020 (4)',NULL,NULL,'EPSG','9615','NTv2','EPSG','4283','EPSG','7844','EPSG','4169',0.05,'EPSG','8656','Latitude and longitude difference file','GDA94_GDA2020_conformal_christmas_island.gsb',NULL,NULL,NULL,NULL,NULL,NULL,'ICSM-Cxr Conf',0);
+INSERT INTO "grid_transformation" VALUES('EPSG','8445','GDA94 to GDA2020 (5)',NULL,NULL,'EPSG','9615','NTv2','EPSG','4283','EPSG','7844','EPSG','1069',0.05,'EPSG','8656','Latitude and longitude difference file','GDA94_GDA2020_conformal_cocos_island.gsb',NULL,NULL,NULL,NULL,NULL,NULL,'ICSM-Cck Conf',0);
INSERT INTO "grid_transformation" VALUES('EPSG','8446','GDA94 to GDA2020 (3)',NULL,NULL,'EPSG','9615','NTv2','EPSG','4283','EPSG','7844','EPSG','2575',0.05,'EPSG','8656','Latitude and longitude difference file','GDA94_GDA2020_conformal.gsb',NULL,NULL,NULL,NULL,NULL,NULL,'ICSM-Aus NTv2 Conf',0);
INSERT INTO "grid_transformation" VALUES('EPSG','8447','GDA94 to GDA2020 (2)',NULL,NULL,'EPSG','9615','NTv2','EPSG','4283','EPSG','7844','EPSG','2575',0.05,'EPSG','8656','Latitude and longitude difference file','GDA94_GDA2020_conformal_and_distortion.gsb',NULL,NULL,NULL,NULL,NULL,NULL,'ICSM-Aus Conf and Dist',0);
INSERT INTO "grid_transformation" VALUES('EPSG','8451','GDA2020 to AHD height (1)',NULL,NULL,'EPSG','1048','Geographic3D to GravityRelatedHeight (Ausgeoid v2)','EPSG','7843','EPSG','5711','EPSG','4493',0.03,'EPSG','8666','Geoid (height correction) model file','AUSGeoid2020_windows_binary.gsb',NULL,NULL,NULL,NULL,NULL,NULL,'GA-Aus 2020',0);
=====================================
data/sql/helmert_transformation.sql
=====================================
@@ -1089,8 +1089,10 @@ INSERT INTO "helmert_transformation" VALUES('EPSG','8892','LKS94 to ETRS89 (1)',
INSERT INTO "helmert_transformation" VALUES('EPSG','8893','SRB_ETRS89 to ETRS89 (1)',NULL,NULL,'EPSG','9603','Geocentric translations (geog2D domain)','EPSG','8685','EPSG','4258','EPSG','3534',0.0,0.0,0.0,0.0,'EPSG','9001',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'IOGP-Sbr',0);
INSERT INTO "helmert_transformation" VALUES('EPSG','8894','SRB_ETRS89 to WGS 84 (1)',NULL,NULL,'EPSG','9603','Geocentric translations (geog2D domain)','EPSG','8685','EPSG','4326','EPSG','3534',1.0,0.0,0.0,0.0,'EPSG','9001',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'IOGP-Srb',0);
INSERT INTO "helmert_transformation" VALUES('EPSG','8895','CHTRF95 to ETRS89 (1)',NULL,NULL,'EPSG','9603','Geocentric translations (geog2D domain)','EPSG','4151','EPSG','4258','EPSG','1286',0.0,0.0,0.0,0.0,'EPSG','9001',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'IOGP-Che',0);
-INSERT INTO "helmert_transformation" VALUES('EPSG','8913','CR05 to CR-SIRGAS (1)',NULL,NULL,'EPSG','9606','Position Vector transformation (geog2D domain)','EPSG','5364','EPSG','8906','EPSG','1074',0.5,-0.16959,0.35312,0.51846,'EPSG','9001',-0.03385,0.16325,-0.03446,'EPSG','9104',0.03693,'EPSG','9202',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'IGN-Cri 2014',0);
-INSERT INTO "helmert_transformation" VALUES('EPSG','8914','CR05 to WGS 84 (2)',NULL,NULL,'EPSG','9606','Position Vector transformation (geog2D domain)','EPSG','5364','EPSG','4326','EPSG','1074',1.0,-0.16959,0.35312,0.51846,'EPSG','9001',-0.03385,0.16325,-0.03446,'EPSG','9104',0.03693,'EPSG','9202',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'IGN-Cri 2014',0);
+INSERT INTO "helmert_transformation" VALUES('EPSG','8913','CR05 to CR-SIRGAS (1)',NULL,NULL,'EPSG','9606','Position Vector transformation (geog2D domain)','EPSG','5364','EPSG','8906','EPSG','1074',0.5,-0.16959,0.35312,0.51846,'EPSG','9001',-0.03385,0.16325,-0.03446,'EPSG','9104',0.03693,'EPSG','9202',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'IGN-Cri 2014',1);
+INSERT INTO "helmert_transformation" VALUES('EPSG','8914','CR05 to WGS 84 (2)',NULL,NULL,'EPSG','9606','Position Vector transformation (geog2D domain)','EPSG','5364','EPSG','4326','EPSG','1074',1.0,-0.16959,0.35312,0.51846,'EPSG','9001',-0.03385,0.16325,-0.03446,'EPSG','9104',0.03693,'EPSG','9202',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'IGN-Cri 2014',1);
+INSERT INTO "helmert_transformation" VALUES('EPSG','8968','CR05 to CR-SIRGAS (1)',NULL,NULL,'EPSG','9606','Position Vector transformation (geog2D domain)','EPSG','5365','EPSG','8907','EPSG','1074',0.5,-0.16959,0.35312,0.51846,'EPSG','9001',-0.03385,0.16325,-0.03446,'EPSG','9104',0.03693,'EPSG','9202',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'IGN-Cri 2014',0);
+INSERT INTO "helmert_transformation" VALUES('EPSG','8969','CR05 to WGS 84 (2)',NULL,NULL,'EPSG','9606','Position Vector transformation (geog2D domain)','EPSG','5365','EPSG','4326','EPSG','1074',1.0,-0.16959,0.35312,0.51846,'EPSG','9001',-0.03385,0.16325,-0.03446,'EPSG','9104',0.03693,'EPSG','9202',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'IGN-Cri 2014',0);
INSERT INTO "helmert_transformation" VALUES('EPSG','10085','Trinidad 1903 to WGS 84 (2)',NULL,NULL,'EPSG','9603','Geocentric translations (geog2D domain)','EPSG','4302','EPSG','4326','EPSG','1339',3.0,-61.0,285.2,471.6,'EPSG','9001',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'EOG-Tto Trin',0);
INSERT INTO "helmert_transformation" VALUES('EPSG','10086','JAD69 to WGS 72 (1)',NULL,NULL,'EPSG','9603','Geocentric translations (geog2D domain)','EPSG','4242','EPSG','4322','EPSG','3342',15.0,48.0,208.0,382.0,'EPSG','9001',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'SD-Jam',0);
INSERT INTO "helmert_transformation" VALUES('EPSG','10089','Aratu to WGS 84 (5)',NULL,NULL,'EPSG','9603','Geocentric translations (geog2D domain)','EPSG','4208','EPSG','4326','EPSG','2962',7.0,-163.466,317.396,-147.538,'EPSG','9001',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'EXM-Bra Santos',0);
=====================================
data/sql/metadata.sql
=====================================
@@ -1,2 +1,2 @@
-INSERT INTO "metadata" VALUES('EPSG.VERSION', 'v9.6.1');
-INSERT INTO "metadata" VALUES('EPSG.DATE', '2019-03-25');
+INSERT INTO "metadata" VALUES('EPSG.VERSION', 'v9.6.2');
+INSERT INTO "metadata" VALUES('EPSG.DATE', '2019-05-08');
=====================================
src/iso19111/c_api.cpp
=====================================
@@ -30,10 +30,12 @@
#define FROM_PROJ_CPP
#endif
+#include <algorithm>
#include <cassert>
#include <cstdarg>
#include <cstring>
#include <map>
+#include <memory>
#include <new>
#include <utility>
#include <vector>
@@ -151,6 +153,7 @@ static PJ *pj_obj_create(PJ_CONTEXT *ctx, const IdentifiedObjectNNPtr &objIn) {
}
auto pj = pj_new();
if (pj) {
+ pj->ctx = ctx;
pj->descr = "ISO-19111 object";
pj->iso_obj = objIn;
}
@@ -6793,6 +6796,59 @@ int proj_cs_get_axis_info(PJ_CONTEXT *ctx, const PJ *cs, int index,
* nullptr in case of error
*/
PJ *proj_normalize_for_visualization(PJ_CONTEXT *ctx, const PJ *obj) {
+
+ SANITIZE_CTX(ctx);
+ if (!obj->alternativeCoordinateOperations.empty()) {
+ try {
+ auto pjNew = std::unique_ptr<PJ>(pj_new());
+ if (!pjNew)
+ return nullptr;
+ pjNew->ctx = ctx;
+ for (const auto &alt : obj->alternativeCoordinateOperations) {
+ auto co = dynamic_cast<const CoordinateOperation *>(
+ alt.pj->iso_obj.get());
+ if (co) {
+ double minxSrc = alt.minxSrc;
+ double minySrc = alt.minySrc;
+ double maxxSrc = alt.maxxSrc;
+ double maxySrc = alt.maxySrc;
+ double minxDst = alt.minxDst;
+ double minyDst = alt.minyDst;
+ double maxxDst = alt.maxxDst;
+ double maxyDst = alt.maxyDst;
+
+ auto l_sourceCRS = co->sourceCRS();
+ auto l_targetCRS = co->targetCRS();
+ if (l_sourceCRS && l_targetCRS) {
+ const bool swapSource =
+ l_sourceCRS
+ ->mustAxisOrderBeSwitchedForVisualization();
+ if (swapSource) {
+ std::swap(minxSrc, minySrc);
+ std::swap(maxxSrc, maxySrc);
+ }
+ const bool swapTarget =
+ l_targetCRS
+ ->mustAxisOrderBeSwitchedForVisualization();
+ if (swapTarget) {
+ std::swap(minxDst, minyDst);
+ std::swap(maxxDst, maxyDst);
+ }
+ }
+ pjNew->alternativeCoordinateOperations.emplace_back(
+ minxSrc, minySrc, maxxSrc, maxySrc, minxDst, minyDst,
+ maxxDst, maxyDst,
+ pj_obj_create(ctx, co->normalizeForVisualization()),
+ co->nameStr());
+ }
+ }
+ return pjNew.release();
+ } catch (const std::exception &e) {
+ proj_log_debug(ctx, __FUNCTION__, e.what());
+ return nullptr;
+ }
+ }
+
auto co = dynamic_cast<const CoordinateOperation *>(obj->iso_obj.get());
if (!co) {
proj_log_error(ctx, __FUNCTION__, "Object is not a CoordinateOperation "
=====================================
src/release.cpp
=====================================
@@ -11,7 +11,7 @@ char const pj_release[] =
STR(PROJ_VERSION_MAJOR)"."
STR(PROJ_VERSION_MINOR)"."
STR(PROJ_VERSION_PATCH)", "
- "September 1st, 2019";
+ "May 15th, 2019";
const char *pj_get_release() {
return pj_release;
=====================================
test/unit/test_c_api.cpp
=====================================
@@ -3247,4 +3247,69 @@ TEST_F(CApi, proj_normalize_for_visualization) {
"+step +proj=utm +zone=31 +ellps=WGS84");
}
+// ---------------------------------------------------------------------------
+
+TEST_F(CApi, proj_normalize_for_visualization_with_alternatives) {
+
+ auto P = proj_create_crs_to_crs(m_ctxt, "EPSG:4326", "EPSG:3003", nullptr);
+ ObjectKeeper keeper_P(P);
+ ASSERT_NE(P, nullptr);
+ auto Pnormalized = proj_normalize_for_visualization(m_ctxt, P);
+ ObjectKeeper keeper_Pnormalized(Pnormalized);
+ ASSERT_NE(Pnormalized, nullptr);
+
+ {
+ PJ_COORD c;
+ // Approximately Roma
+ c.lpz.lam = 12.5;
+ c.lpz.phi = 42;
+ c.lpz.z = 0;
+ c = proj_trans(Pnormalized, PJ_FWD, c);
+ EXPECT_NEAR(c.xy.x, 1789912.46264783037, 1e-8);
+ EXPECT_NEAR(c.xy.y, 4655716.25402576849, 1e-8);
+ auto projstr = proj_pj_info(Pnormalized).definition;
+ ASSERT_NE(projstr, nullptr);
+ EXPECT_EQ(std::string(projstr),
+ "proj=pipeline step proj=unitconvert xy_in=deg xy_out=rad "
+ "step proj=push v_3 step proj=cart ellps=WGS84 "
+ "step inv proj=helmert x=-104.1 y=-49.1 z=-9.9 rx=0.971 "
+ "ry=-2.917 rz=0.714 s=-11.68 convention=position_vector "
+ "step inv proj=cart ellps=intl step proj=pop v_3 "
+ "step proj=tmerc lat_0=0 lon_0=9 k=0.9996 x_0=1500000 "
+ "y_0=0 ellps=intl");
+ }
+
+ {
+ PJ_COORD c;
+ // Approximately Roma
+ c.xyz.x = 1789912.46264783037;
+ c.xyz.y = 4655716.25402576849;
+ c.xyz.z = 0;
+ c = proj_trans(Pnormalized, PJ_INV, c);
+ EXPECT_NEAR(c.lp.lam, 12.5, 1e-8);
+ EXPECT_NEAR(c.lp.phi, 42, 1e-8);
+ }
+}
+
+// ---------------------------------------------------------------------------
+
+TEST_F(CApi, proj_normalize_for_visualization_with_alternatives_reverse) {
+
+ auto P = proj_create_crs_to_crs(m_ctxt, "EPSG:3003", "EPSG:4326", nullptr);
+ ObjectKeeper keeper_P(P);
+ ASSERT_NE(P, nullptr);
+ auto Pnormalized = proj_normalize_for_visualization(m_ctxt, P);
+ ObjectKeeper keeper_Pnormalized(Pnormalized);
+ ASSERT_NE(Pnormalized, nullptr);
+
+ PJ_COORD c;
+ // Approximately Roma
+ c.xyz.x = 1789912.46264783037;
+ c.xyz.y = 4655716.25402576849;
+ c.xyz.z = 0;
+ c = proj_trans(Pnormalized, PJ_FWD, c);
+ EXPECT_NEAR(c.lp.lam, 12.5, 1e-8);
+ EXPECT_NEAR(c.lp.phi, 42, 1e-8);
+}
+
} // namespace
View it on GitLab: https://salsa.debian.org/debian-gis-team/proj/commit/5e3412f5503d1d46fa200b082b7ab9ace81a46a5
--
View it on GitLab: https://salsa.debian.org/debian-gis-team/proj/commit/5e3412f5503d1d46fa200b082b7ab9ace81a46a5
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20190510/b8a8e9e9/attachment-0001.html>
More information about the Pkg-grass-devel
mailing list