aboutsummaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2020-02-27Make tests independent of proj-datumgridEven Rouault
Fixes #1984 - Copy BETA2007.gsb, MD, alaska, conus, ntf_r93.gsb, ntv1_can.dat grids from proj-datumgrid to data/tests. - Replace a couple uses of nzgd2kgrid0005.gsb in tests by ntf_r93.gsb - Add downsampled/subsetted versions of egm96_15.gtx as tests/egm96_15_downsampled.gtx and ntv2_0.gsb as tests/ntv2_0_downsampled.gsb This results in a few changes in expected results - Simpify travis/install.sh due to less configurations to test This results in a hopefully acceptable increase of the proj-X.Y.Z.tar.gz from 2.9 to 5.3 MB
2020-02-26Database: register 4 height Austrian grids from ↵Even Rouault
https://github.com/OSGeo/PROJ-data/pull/13 + handle 'Vertical Offset by Grid Interpolation (BEV AT)' method
2020-02-26Database: update to EPSG v9.8.7Even Rouault
2020-02-25createOperations(): be robust to a GeographicCRS having a wrong ID attached ↵Even Rouault
to it (fixes #1982)
2020-02-25CompoundCRS::create(): reject combinations of components not allowed by ISO ↵Even Rouault
19111
2020-02-24createOperations(): keep height/z value in Helmert transform between 3D CRSEven Rouault
This is the consequence of a private email thread between me, Joel Haasdyk and Roger Lott. I initially raised that the GDA2020 technical manual advertized the Helmert transformation between GDA94 to GDA2020 to be a 3D one, with example of a test point where ellipsoidal heights where modified. It appears this was intended. The corresponding record in EPSG uses the EPSG:9607 "Coordinate Frame rotation (geog2D domain)" method between the 2D geographic CRS of GDA94 and GDA2020. From the email exchange, it appears that there's a lot of legacy explaining that Helmert transformations are registered only between 2D CRS, which doesn't mean that when applied to the corresponding 3D CRS, the change in ellipsoidal height should be discarded. Related to that, the EPSG database, while it has methods flagged "(geog3D domain)" never uses them. So... this changeset slightly ammends PROJ behaviour to ignore the "(geog2D domain)" flag, but only consider the dimensionality of the source & target CRS. However, for a EPSG transformation, those are always 2D CRS, hence introduce the use3DHelmert_ hack when we know that ultimately the 'real' source & target CRS are 3D. I wouldn't be surprised if in more complex pipeline the above logic would be lacking. But it fixes at least simple transformations.
2020-02-24Fix mapping of Vertical_Near_Side_Perspective (fixes #1965)Nyall Dawson
2020-02-22Merge pull request #1962 from mwtoews/sharedMike Taves
CMake: rename BUILD_LIBPROJ_SHARED to BUILD_SHARED_LIBS
2020-02-21test_network.cpp: fix test failures on big endian archs (fixes #1958)Even Rouault
2020-02-21Switch build configuration logic from DISABLE_TIFF to ENABLE_TIFFMike Taves
* Autotools interface should be the same, but different ./configure --help * For CMake, the option should be -DENABLE_TIFF=NO (default is YES) * Use TIFF_ENABLED and CURL_ENABLED variables, based on option and outcome * Reword some messages and add hints * Move -DTIFF_ENABLED and -DCURL_ENABLED from global add_definitions() to target_compile_definitions(), which is recommended practice * Minor spelling and style consistency around SQLITE_VERSION check
2020-02-21CMake: rename BUILD_LIBPROJ_SHARED to BUILD_SHARED_LIBSMike Taves
* Deprecate BUILD_LIBPROJ_SHARED, but still use it as an alias for now * Rename BUILD_LIBPROJ_SHARED_DEFAULT to BUILD_SHARED_LIBS_DEFAULT * Keep previous defaults (UNIX as shared and Windows as static) * Remove PROJ_LIBRARY_TYPE, since add_library() uses BUILD_SHARED_LIBS
2020-02-20Fix wrong byte-swapping for NTv2 grids affecting master after RFC4 work ↵Even Rouault
(fixes #1938) And add testing of both little-endian and big-endian NTv2 files
2020-02-19validateParameters(): fix false-positive warning on Equidistant CylindricalEven Rouault
We required the 'Latitude of natural origin' parameter to be present, but it is only a GDAL/PROJ specific thing, not a EPSG one.
2020-02-19DatabaseContext::lookForGridInfo(): use also old_proj_grid_name for lookups ↵Even Rouault
(fixes #1942)
2020-02-18test: enhance testing of proj_grid_get_info_from_databaseEven Rouault
2020-02-08Merge pull request #1917 from rouault/fix_test_issues_on_i386Kristian Evers
Fix test issues on i386
2020-02-07Fix test issues on i386Even Rouault
Fix a few issues of #1906 found when running the test suite on Ubuntu 16.04 with gcc 5.5 -m32. When applied on top of the fix of #1912, make check succeeds
2020-02-06cart: Avoid discontinuity at poles in the inverse caseKristian Evers
This should avoid issues with numerical stability as uncovered in https://github.com/OSGeo/PROJ/issues/1906. Practically speaking this change isn't going to affect real life scenarios since the position of the center of the Earth is rarely expressed in geodetic coordinates.
2020-02-06Merge pull request #1915 from rouault/fix_1911Even Rouault
Fix identification of ESRI-style datum names starting with D_ but without alias
2020-02-05Fix identification of ESRI-style datum names starting with D_ but without aliasEven Rouault
Fixes #1911
2020-02-05Fix performance issue, affecting projinfo EPSG:7842Even Rouault
Fixes #1913 AuthorityFactory::createBetweenGeodeticCRSWithDatumBasedIntermediates() issued a complex SQL query that pushes the SQLite3 query plan optimizer to its limits. Was working reasonably with sqlite 3.11, but not with later versions. So put less constraints in the main query and do post-processing checks and auxiliary requests to avoid such issues. For some unknown reason, this slightly slows down a bit execution time of the whole test_cpp_api binary (~ 10%), but couldn't come with something better, despite trying many variations of the main SQL query. It seems that in the general case the non-filter LEFT JOIN on the supersession table helped, except on this EPSG:7842 case.
2020-02-04Add projsync utilityEven Rouault
Fixes #1750
2020-02-01test/fuzzers/build.sh: statically link sqlite3 for i386 buildsEven Rouault
2020-01-30Merge pull request #1897 from rouault/map_geocentric_translation_methodKristian Evers
Add EPSG records for 'Geocentric translation by Grid Interpolation (IGN)' (gr3df97a.txt) and map them to new +proj=xyzgridshift
2020-01-29Remove 'null' grid file as it is now a special hardcoded case in grid codeEven Rouault
2020-01-29test/fuzzers/build.sh: build with static libtiff [ci skip]Even Rouault
2020-01-29Merge pull request #1896 from rouault/add_set_operationKristian Evers
Add +proj=set operation to set component(s) of a coordinate to a fixed value
2020-01-29Add EPSG records for 'Geocentric translation by Grid Interpolation (IGN)' ↵Even Rouault
(gr3df97a.txt) and map them to new +proj=xyzgridshift
2020-01-29Make it possible to use grids from the CDN by their 'old name' even if not ↵Even Rouault
in the EPSG/grid_transformation table
2020-01-29Merge pull request #1891 from rouault/rfc5Even Rouault
Implement RFC5: Adopt GeoTIFF-based grids for grids delivered with PROJ
2020-01-28Add +proj=set operation to set component(s) of a coordinate to a fixed valueEven Rouault
Fixes #1846
2020-01-27projinfo: add --remote-data switchEven Rouault
2020-01-27projinfo: add --searchpaths switchEven Rouault
2020-01-26Fix ossfuzz builds [ci skip]Even Rouault
2020-01-25Merge pull request #1884 from rouault/cea_k_0Kristian Evers
Fix ingestion of +proj=cea with +k_0
2020-01-25Fix ingestion of +proj=cea with +k_0Even Rouault
Fixes #1881 Digging into the implementation of proj=cea, it appears that k_0 and lat_ts are intended to be exclusive ways of specifying the same concept. EPSG only models the variant using lat_s. So if k_0 is found and lat_ts is absent, compute the equivalent value of lat_ts from k_0. Note: k_0 should normally be in the [0,1] range. In case creative users would use something outside, we raise an exception, even if the cea implementation could potentially deal with any k_0 value. Hopefully this is a (reasonable) limitation that will address nominal use cases.
2020-01-25Grid correction: fix handling grids spanning antimeridian (fixes #1859)Even Rouault
2020-01-25Implement RFC 5Even Rouault
2020-01-24createObjectsFromName(): use alias as fallback onlyEven Rouault
Fixes a regression of 6.3.0 found when creating with GDAL a TIFF with a Geographic3D CRS. As TIFF must also encode the Geographic2D CRS, the code of the Geographic2D CRS is searched from the name of the Geographic3D CRS. When doing createObjectsFromName( "ETRS89", {AuthorityFactory::ObjectType::GEOGRAPHIC_2D_CRS}, false, 1), the result returned was not EPSG:4258 as expected, but EPSG:4173 IRENET95 which is registered as an alias of ETRS89. So sort results such that non-alias results are returned first.
2020-01-23Database: add a geoid_like value for proj_method column of ↵Even Rouault
grid_alternatives, fix related entries and simplify/robustify logic to deal with EPSG 'Geographic3D to GravityRelatedHeight' methods
2020-01-22Database: update to EPSG v9.8.6Even Rouault
Fixes #1867
2020-01-22Merge RFC4 (#1865)Even Rouault
This commit is the result of the squashing of rfc4_dev branch in a single commit. It implements mostly RFC 4 related work. * Grid handling: - remove obsolete and presumably unfinished implementation of grid catalog functionality - all grid functionality is in grids.cpp/.hpp - vertical and horizontal grid shift: rework to no longer load whole grid into memory - remove hgrids and vgrids member from PJ structure, and store them in hgridshift/vgridshift/deformation structures - build systems: add optional libtiff dependency. Must be explicitly disabled if not desired - add support for horizontal and vertical grids in GeoTIFF, if libtiff is available - add GenericShiftGridSet and GenericShiftGrid classes, relying on TIFF grids, that can be used for generic purpose grid-based adjustment - add a +proj=xyzgridshift method to perform geocentric translation by grid. Used for French NTF to RGF93 transformation using gr3df97a.tif grid - deformation: add support for +grids= for GeoTIFF grids - horizontal grid shift: fix failures on points slightly outside a subgrid (fixes #209) * File management: - add a filemanager.cpp/.hpp to deal with file related work - test for legacy proj_api.h fileapi - proj.h: add proj_context_set_fileapi() and proj_context_set_sqlite3_vfs_name() (fixes #866) - add capability to read resource files from the user writable directory * Network access: - build systems: add optional curl dependency - add a curl-based default implementation for network related functionality - proj.h: add C API to control network functionality, and optionaly provide network callbacks - add data/proj.ini with default settings - add a SQLite3 local cache of downloaded chunks - add proj_is_download_needed() and proj_download_file() * Use Win32 Unicode APIs and expect all strings to be UTF-8 (fixes #1765) For backward compatibility, if PROJ_LIB content is found to be not UTF-8 or pointing to a non existing directory, then an attempt at interpretating it in the ANSI page encoding is done. proj_context_set_search_paths() now assumes strings to be in UTF-8, and functions returning paths will also return values in UTF-8.
2020-01-21ProjectedCRS::identify(): fix wrong identification of some ESRI WKT linked ↵Even Rouault
to units Fixes bug reported in https://lists.osgeo.org/pipermail/gdal-dev/2020-January/051481.html
2020-01-13test/fuzzers/standard_fuzzer.cpp: remove dependency to proj_internal.hEven Rouault
2020-01-11Merge pull request #1838 from rouault/limit_datum_name_massaging_wkt1Even Rouault
WKT1_GDAL export: limit datum name massaging to names matching EPSG (fixes #1835)
2020-01-11Merge pull request #1836 from rouault/fix_projcrs3D_with_non_metre_z_unitEven Rouault
createOperations(): fix dealing with projected 3D CRS whose Z units != metre
2020-01-11WKT1_GDAL export: limit datum name massaging to names matching EPSG (fixes ↵Even Rouault
#1835)
2020-01-10CompoundCRS::identify(): avoid exception when horiz/vertical part is a BoundCRSEven Rouault
The exception only affects C++ users. It was caught by the C layer.
2020-01-10createOperations(): fix dealing with projected 3D CRS whose Z units != metreEven Rouault
2020-01-08Merge pull request #1827 from rouault/improve_createObjectsFromNameKristian Evers
Improvements regarding name aliases (refs #1823)