aboutsummaryrefslogtreecommitdiff
path: root/test/unit/test_c_api.cpp
AgeCommit message (Collapse)Author
2020-08-20projCtx_t: Copy ini file settings, proj4_init_rules, etc.. when initializing ↵Alan D. Snow
context from global (#2331)
2020-08-19Code reformattingEven Rouault
2020-08-19Clone projCppContext context when copying projCtx_t (#2324)Alan D. Snow
2020-07-08formatting fixEven Rouault
2020-06-26ENH: Added temporal, engineering, and parametric datum PJ_TYPE enumerationssnowman2
2020-06-16createOperations(): fix transformations between BoundCRS and Geocentric CRSEven Rouault
2020-06-10Fix access violation in proj_context_get_database_metadataOlli Räisä
2020-05-24Database: import scope and remarks for conversion (fixes #2237)Even Rouault
2020-05-09scripts/fix_typos.sh: fix URLs to dictionaries, and fix typos spottedEven Rouault
2020-04-21Typo fixes in code comments [ci skip]Even Rouault
2020-04-15C API: add proj_operation_factory_context_set_allow_ballpark_transformations()Even Rouault
2020-03-25EngineeringCRS: when exporting to WKT1_GDAL, output unit and axis (fixes ↵Even Rouault
https://github.com/OSGeo/gdal/issues/2347)
2020-03-19proj_get_suggested_operation(): fix when there are only operations without ↵Even Rouault
area of use
2020-03-16Merge branch 'master' into add_proj_get_suggested_operationEven Rouault
2020-03-13Add proj_get_suggested_operation()Even Rouault
Return the index of the operation that would be the most appropriate to transform the specified coordinates. This operation may use resources that are not locally available, depending on the search criteria used by proj_create_operations(). This could be done by using proj_create_operations() with a punctual bounding box, but this function is faster when one needs to evaluate on many points with the same (source_crs, target_crs) tuple.
2020-03-12Add proj_get_units_from_database() (fixes #2004)Even Rouault
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-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-01-25Implement RFC 5Even Rouault
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-07createObjectsFromName(): make it look up in the alias_name table too (fixes ↵Even Rouault
#1823)
2019-12-16identify(): take into datum name aliases (fixes #1800)Even Rouault
2019-12-14Add proj_coordoperation_create_inverse to C API (#1795)Nyall Dawson
2019-11-22Add proj_create_derived_geographic_crs() and ↵Even Rouault
proj_create_conversion_pole_rotation_grib_convention() to address GRIB datasets using a pole rotation method
2019-11-14import/export PROJJSON: support a interpolation_crs key to geoid_model for ↵Even Rouault
faithful serialization of the geoid_geog_crs parameter of proj_create_vertical_crs_ex()
2019-11-04Merge remote-tracking branch 'origin/master' into geoid_modelEven Rouault
2019-11-02Add a geoid_model name in database, use GEOIDMODEL for transformations, add ↵Even Rouault
a proj_create_vertical_crs_ex()
2019-11-02WKT and PROJJSON: add import/export of geoid model of VertCRSEven Rouault
2019-10-30createFromWkt(): be tolerant to missing scale_factor parameter (fixes #1700)Even Rouault
This is invalid WKT, but GDAL 2.4 used to accept it and make a reasonable use of it... Currently we default it to 0 which is non sensical. Better use 1 as GDAL 2.4 did, and emit a warning. Other fix: proj_create_from_wkt() was documented to operate by default in non-strict validation mode, but it was actually in strict mode. So do as documented.
2019-10-27Database: add an auxiliary concatenated_operation_step table to allow ↵Even Rouault
arbitrary number of steps (fixes #1632) EPSG:9103 (NAD27 to ITRF2014 (1)) is now handled. Note:EPSG:9104 (NAD27 to ITRF2014 (2)) is not currently, since it uses for step EPSG:8861 (NAD83(HARN) to NAD83(FBN) (1)) an unsupported transformation method (NADCON5 (3D), EPSG:1075).
2019-10-25Fix indentationEven Rouault
2019-10-24Generalize generalize_proj_crs_create_bound_vertical_crs_to_WGS84()Even Rouault
In recent commits, we added a generalize_proj_crs_create_bound_vertical_crs_to_WGS84() function, but there are situations where more accurate results can be obtained, if instead of specifying WGS84 as the hub CRS, the user can specify the exact hub CRS. For example the GEOID2018 grid is against NAD83(2011). So replace this function with proj_crs_create_bound_vertical_crs()
2019-10-15Database: update to EPSG v9.8.3Even Rouault
Note: a hack has been added into customizations.sql to cancel deprecatation of USA geoid2012 grids by geoid2018 grids, as the later are not yet available in proj-datumgrid-northamerica (https://github.com/OSGeo/proj-datumgrid/issues/55)
2019-10-15formatting changeEven Rouault
2019-10-12Merge pull request #1665 from ↵Kristian Evers
rouault/fix_custom_compound_crs_with_NAD83_2011_and_geoidgrid_to_WGS84_G1762 proj_create_crs_to_crs(): remove elimination of Ballpark operations that caused transformation failures in some cases
2019-10-12proj_create_crs_to_crs(): remove elimination of Ballpark operations that ↵Even Rouault
caused transformation failures in some cases
2019-10-04Add a proj_crs_demote_to_2D(). Useful if forced to export a 3D CRS to a best ↵Even Rouault
approximate as WKT1 that doesn't support it
2019-10-04proj_normalize_for_visualization(): make it work with CRS objectsEven Rouault
2019-10-02Add API and WKT mapping for 'nsper' to EPSG Vertical Persepective methodEven Rouault
Relates to https://github.com/OSGeo/gdal/issues/1856
2019-09-26proj_create_crs_to_crs(): fix when there are only transformations with ↵Even Rouault
ballpark steps Currently we would discard all operations, resulting in a PJ object with zero candidates. Better use those operations if nothing better is available. Was seen on transforming from ETRS89 / UTM zone 31N + EGM96 height to WGS 84 (G1762). The horizontal transformation from ETRS89 to WGS 84 (G1762) is a ballpark one.
2019-09-23Database: update to EPSG 9.8.2Even Rouault
With limitation of https://github.com/OSGeo/PROJ/issues/1632 regarding concatenated operations with more than 3 steps.
2019-09-12C API: add proj_crs_create_bound_vertical_crs_to_WGS84()Even Rouault
2019-09-11API: add CRS::promoteTo3D(), proj_crs_promote_to_3D() and ↵Even Rouault
proj_crs_create_projected_3D_crs_from_2D() (fixes #1587) Also add a --3d switch to projinfo
2019-09-08Merge pull request #1585 from rouault/replace_2018_by_2019Kristian Evers
Use in API and utilities WKT2_2019 instead of WKT2_2018 (fixes #1578)
2019-09-08Use in API and utilities WKT2_2019 instead of WKT2_2018 (fixes #1518)Even Rouault
- C API: PJ_GUESSED_WKT2_2019 is added, PJ_GUESSED_WKT2_2018 aliased to it - C API: PJ_WKT2_2019[_SIMPLIFIED] is added, PJ_WKT2_2018[_SIMPLIFIED] alias to it - C++ API: similarly for WKTFormatter::Convention::WKT2_2019[_SIMPLIFIED] Those above changes should be fully backward API and ABI compatible. projinfo changes: - accept WKT2_2019 as value for -o switch. WKT2_2018 is still accepted (undocumented) - output now uses 'WKT2_2019 string:', so might break scripts that would rely on that. Other internal code references to WKT2_2018 changes to WKT2_2019, included in tests.
2019-09-04C API: add proj_create_ellipsoidal_3D_cs()Even Rouault
2019-08-23Add proj_create_crs_to_crs_from_pj()Even Rouault
I've been frustrated a number of times with proj_create_crs_to_crs() not accepting a PJ* object for the source and target CRS. And thus constraining to go back to WKT2 in a artificial way.
2019-08-20C API: add proj_context_set_autoclose_database() to automatically close ↵Even Rouault
database (fixes #1565)