aboutsummaryrefslogtreecommitdiff
path: root/test/cli
AgeCommit message (Collapse)Author
2022-03-16Transformation: no longer do vertical trasnformation when doing compound CRS ↵Even Rouault
to 2D CRS / add --3d to cs2cs Previously, when computing transformation between a compound CRS and a geographic/projected 2D CRS, the behaviour was similar to implicitly promoting the 2D CRS to 3D CRS in the pipeline computation logic, hence a geoid model could be applied. But note that when doing a geographic 3D to geographic/projected 2D CRS transformation, we *did* not do this implicit promotion and if a Helmert transformation existed between the datums, it was done only in 2D. So this is a bit inconsistent and triggered the comment in https://github.com/OSGeo/PROJ/issues/2318#issuecomment-1068924513 With this commit, we no longer do any vertical transformation when doing compound CRS to the 2D CRS, but just take the transformation of the horizontal part of the compound CRS to the 2D CRS. Said otherwise, NAD83+NAVD88 to NAD83 will no longer lead to the application of the geoid model. Unless you explicitly ask for the promotion NAD83 to 3D. Also related, in https://github.com/OSGeo/PROJ/issues/1563 that went to 6.3.0, I changed cs2cs to automatically promote to 3D the CRS as soon as one of them was compound, for the sake of being consistent with the past behaviour. But it then becomes difficult to predict PROJ behaviour depending on which level of it you consider... This commit undoes that and adds an explicit --3d switch to cs2cs, similarly to projinfo, to ask for promotion. Other bug fix found in the process, when using legacy syntax, +init=epsg:4979, (WGS 84 3D), the resulting CRS was 2D and not 3D.
2022-01-31Drop autotools; move remaining useful m4 macros (#3027)Mike Taves
2021-10-21Database: update to EPSG v10.038Even Rouault
2021-10-09Add testing of invprojEven Rouault
2021-10-09test/cli/testproj: fix wrong variable nameEven Rouault
2021-09-28Database: add IAU_2015 CRSEven Rouault
2021-09-27Database: update to EPSG v10.036Even Rouault
2021-09-17Database: add a 'anchor' field to geodetic_datum and vertical_datum tablesEven Rouault
Update database layout version number to 1.2 consequently This new capability will be used by IAU planetary CRS (refs #2601)
2021-09-15Database: update to EPSG v10.035Even Rouault
This seriously impacts French CRS users with the introduction of new datums, geodetic CRS and projected CRS based on "RGF 93 v2" and "RGF 93 v2b", and the previous single "RGF 93" being renamed as "RGF 93 v1". To be noted too, the addition of a null transformation between NAD83(2011) and WGS 84, which impacts a number of tests in the test suite.
2021-09-15test/cli/testvarious: make one test more robust regarding EPSG updatesEven Rouault
2021-09-14PROJJSON: support additional properties allowed in id object (version, ↵Even Rouault
authority_citation, uri) for parity with WKT2:2019
2021-09-08createOperations(): deal with spherical planetocentric geodetic CRSEven Rouault
This also fixes conversion between geocentric latlong and geodetic latlong with cs2cs. This was dealt with in PR 1093, but in the wrong direction (the geocentric latitude must be <= in absolute value to the geodetic one) The issue here was linked to the semantics of the +geoc specifier, which affects the semantics of the input coordinates in the forward direction (+geoc means that the input coordinate is is a geocentric latitude), which defeats the logic of doing A to B by using the inverse path of A and the forward path of B.
2021-07-20createOperations(): fix SourceTargetCRSExtentUse::NONE modeEven Rouault
Fix issue reported in https://lists.osgeo.org/pipermail/proj/2021-July/010318.html
2021-06-17proj_trans/cs2cs: If two operations have the same accuracy, use the one that ↵Even Rouault
is contained within a larger one Relates to https://github.com/OSGeo/gdal/issues/3998 Before that change, cs2cs on a NAD83(HARN) to WGS84 transformation would use the "NAD83(HARN) to WGS 84 (1)" transformation (a null Helmert shift) that is valid for whole US, including non-CONUS areas, even when used on points located on CONUS that has a "NAD83(HARN) to WGS 84 (3)" transformation (non-null Helmert shift) with same accuracy (1m). But if doing EPSG:2874 "NAD83(HARN) / California zone 5 (ftUS)" to WGS84, we would use this later "NAD83(HARN) to WGS 84 (3)" transformation because the area of use of EPSG:2874 restricts to CONUS. This isn't consistant. With that change, we now have more consistent behavior, even if it can be argued which of the 2 transformations is the best... $ echo 34 -120 | src/cs2cs -d 8 EPSG:4326 "NAD83(HARN)" | src/cs2cs "NAD83(HARN)" EPSG:2874 5955507.74 1828410.98 0.00 $ echo 34 -120 | src/cs2cs EPSG:4326 EPSG:2874 5955507.74 1828410.98 0.00
2021-05-24Database: decrease DB size by using WITHOUT ROWID tablesEven Rouault
None of our tables are indexed by a INTEGER PRIMARY KEY, but most of them are by a (auth_name, code) primary key. Consequently they can benefit from being created as WITHOUT ROWID tables (https://sqlite.org/withoutrowid.html), which avoids an index to be created on the rowid we don't use. WITHOUT ROWID is a feature added in SQLite 3.8.2, so as our baseline is 3.11, we can use it. This decreases the DB size from 7,749,632 to 7,229,440 bytes, without any measurable consequence on performance.
2021-05-17projsync: make it filter out files not intended for the current versionEven Rouault
* Add a PROJ_DATA.VERSION in proj.db to indicate the target PROJ-data package version * Make projsync use that information and the version_added and version_removed properties added in https://github.com/OSGeo/PROJ-data/pull/67 to filter out files that are not relevant * Add --no-version-filtering and --verbose switches
2021-05-16Database: update to EPSG v10.022Even Rouault
2021-04-23Move data/proj_outIGNF.dist-real to test/cliEven Rouault
2021-04-23Database: update to EPSG v10.019Even Rouault
Non-trivial updates: - some vertical CRS are now encoded as DerivedVerticalCRS. e.g EPSG:8228 "NAVD88 height (ft)", with base EPSG:5703 "NAVD88 height". As we don't have support in our PROJ db model for DerivedVerticalCRS, modify the import script to 'resolve' the derivation up to the original datum. - Method EPSG:1069 'Change of Vertical Unit' is no longer used. It is replaced by a generic-purpose EPSG:1104 method that doesn't take any conversion factor. And generic conversions EPSG:7812 and EPSG:7813 are now used in concatenated operations, which require code changes as well.
2021-04-12Merge pull request #2659 from rouault/fix_2603Even Rouault
CRS::normalizeForVisualization(): propagate domains/extent of original CRS (fixes #2603)
2021-04-11projinfo --list-crs --area: make it work when multiple areas matches the ↵Even Rouault
specified name
2021-04-11projinfo: add option --list-crs (#2663)Javier Jimenez Shaw
2021-04-11projinfo: add a --normalize-axis-order undocument switchEven Rouault
2021-04-08Merge pull request #2647 from rouault/integer_or_textEven Rouault
Database: decrease db size
2021-04-07test: add datum shift related tests for transformations crossing antimeridianEven Rouault
If using the proposed patch in PR #2616 refreshed as, ``` diff --git a/src/4D_api.cpp b/src/4D_api.cpp index c7725d3a..3bd58a97 100644 --- a/src/4D_api.cpp +++ b/src/4D_api.cpp @@ -998,7 +998,7 @@ static void reproject_bbox(PJ* pjGeogToCrs, constexpr int XY_SIZE = N_STEPS_P1 * 4; std::vector<double> x(XY_SIZE); std::vector<double> y(XY_SIZE); - const double step_lon = (east_lon - west_lon) / N_STEPS; + const double step_lon = (((east_lon >= west_lon) ? east_lon : east_lon + 360) - west_lon) / N_STEPS; const double step_lat = (north_lat - south_lat) / N_STEPS; for( int j = 0; j <= N_STEPS; j++ ) { @@ -1244,7 +1244,7 @@ std::vector<PJCoordOperation> pj_create_prepared_operations(PJ_CONTEXT *ctx, { const bool isOffshore = areaName && strstr(areaName, "- offshore"); - if( west_lon <= east_lon ) + if( true || west_lon <= east_lon ) { op = add_coord_op_to_list(i, op, west_lon, south_lat, east_lon, north_lat, ``` we'd get an incorrect result on one point, using the 'Pulkovo 1942 to WGS 84 (16)' less accurate transformation due to mis-computation of bounding boxes. ``` --- ../test/cli/tv_out.dist 2021-04-07 22:29:02.706095239 +0200 +++ test/cli/tv_out 2021-04-07 22:29:35.809579495 +0200 @@ -499,7 +499,7 @@ ############################################################## Check that we can use a transformation spanning the antimeridian (should use Pulkovo 1942 to WGS 84 (20)) 50 179.999999999 49d59'59.36"N 179d59'52.133"W 0.000 -50 -179.999999999 49d59'59.36"N 179d59'52.133"W 0.000 +50 -179.999999999 49d59'59.422"N 179d59'52.184"W 0.000 ############################################################## Check that we can use a transformation spanning the antimeridian (should use Pulkovo 1942 to WGS 84 (20)) 5540944.47 499999.999 49d59'59.36"N 179d59'52.133"W 0.000 ```
2021-04-06Database: nullify auth_name, code of usage tableEven Rouault
We never select by those columns, so don't set them. Reduce from 8.4 to 7.9 MB. Upgrade the minor version of the database layout. (that database can still be read by PROJ 8.0)
2021-03-28createOperation(): make sure no to discard deprecated operations...Even Rouault
if the replacement uses a grid unknown to us. Fixes issue reported at https://lists.osgeo.org/pipermail/gdal-dev/2021-March/053771.html The issue comes from the fact that EPSG has created 2 transformations using grids BALR2009.gsb ad PENR2009.gsb that supersede the one which uses the single grid SPED2ETV2 we have in PROJ-data.
2021-03-19CRS::promoteTo3D(): propagate the extent from the 2D CRS (fixes #2587)Even Rouault
This will help getting more consistent results between the 2D and 3D cases, as identified in https://github.com/OSGeo/PROJ/issues/2587#issue-836061171
2021-03-15Add support for PROJ_AUX_DB environment variable to set the path to one or ↵Even Rouault
several auxiliary DBs
2021-03-15projinfo: add a --dump-db-structure switchEven Rouault
2021-03-15SQL output: add capability to restrict the authorities into which to look ↵Even Rouault
for intermediate objects
2021-03-15projinfo: add a '-o SQL --output-id AUTH:CODE' SQL outputEven Rouault
2021-03-11Database: fix NKG transformationsEven Rouault
2021-03-07typo fixesEven Rouault
2021-02-09Database: update to EPSG v10.012Nyall Dawson
2021-01-15Database: update to EPSG v10.011Modern Slave
2020-12-16cs2cs: add --no-ballpark and --accuracy optionsEven Rouault
2020-12-15projinfo: add a --accuracy option to define the minimum accuracyEven Rouault
2020-12-02cs2cs / proj_create_crs_to_crs_from_pj(): add a --authority switch to ↵Even Rouault
control where coordinate operations are looked for (fixes #2442)
2020-11-30Merge pull request #2466 from rouault/fix_2423Even Rouault
cs2cs: add --area and --bbox options to restrict candidate coordinate operations (fixes #2423)
2020-11-30API cleanup: unexport number of internal symbols, and remove/replace a few ↵Even Rouault
unused ones
2020-11-28cs2cs: add --area and --bbox options to restrict candidate coordinate ↵Even Rouault
operations (fixes #2423)
2020-11-28Use same arguments to printf format string for both radians and degrees in ↵Houder
output by cct (#2453) Currently the output of the cct utility is different between radians and degrees (as expected by cct), because of a bug in cct: $ printf "1 2\n" | cct -z 0 -t 0 +proj=pipeline +step +proj=unitconvert +xy_in=deg +xy_out=rad 1.0000000000 2.0000000000 0.0000 0.0000 $ printf "1 2\n" | cct -z 0 -t 0 +proj=pipeline +step +proj=unitconvert +xy_in=deg +xy_out=deg 1.0000 2.0000 0.0000 0.0000 The arguments to the printf format string are as follows: * radians: width 14, precision 10 * degrees: width 13, precision 4 (this is by mistake. bug!) After the suggested fix has been applied, output will be the same for both radians and degrees: $ printf "1 2\n" | cct -z 0 -t 0 +proj=pipeline +step +proj=unitconvert +xy_in=deg +xy_out=rad 1.0000000000 2.0000000000 0.0000 0.0000 $ printf "1 2\n" | cct -z 0 -t 0 +proj=pipeline +step +proj=unitconvert +xy_in=deg +xy_out=deg 1.0000000000 2.0000000000 0.0000 0.0000 The cause of the bug is that cct does test if it "has radians to output", but "neglects" to test if it "has degrees to output", resulting in using different arguments to the printf format string in the latter case. The fix makes cct test if it "has either radians or degrees to output".
2020-11-27testcct: create 'a' and 'b' from scratchEven Rouault
2020-11-24createOperation(): add a ballpark vertical transformation when dealing with ↵Even Rouault
GEOIDMODEL[]
2020-11-10cct: allow @filename syntaxEven Rouault
Similarly as for projinfo, allow "cct @filename" to mean read filename and use its content as if it was provided inline. Useful for WKT or PROJJSON And a tiny improvements, when the object definition contains ':', only try proj_create_from_database() if the left part (authority name) matches a known authority, to avoid a warning.
2020-11-10Allow cct to instantiate operations via object codes or names (#2419)Kristian Evers
Running cct like cct EPSG:8366 or cct "ITRF2014 to ETRF2014 (1)" is now possible.
2020-11-01projinfo / createObjectsFromName(): support returning a datum ensembleEven Rouault
2020-11-01When reading from database, possibly return Geographic/GeodeticCRS with a ↵Even Rouault
DatumEnsemble, typically for WGS 84 and ETRS89 ('breaking change')
2020-10-31Make sure that remarks is preserved when substituting (EPSG) grid name by ↵Even Rouault
PROJ one