aboutsummaryrefslogtreecommitdiff
path: root/src/pj_open_lib.c
AgeCommit message (Collapse)Author
2018-05-15IWYU: Partial PJ_natearth.c..rtodms.cKurt Schwehr
2018-03-20Remove final \n from pj_log messages.Kurt Schwehr
There was a mix of pj_log calls with and without a trailing newline. pj_stderr_logger already adds a newline to the end of each msg, so pj_log calls don't need their own.
2018-03-11Remove angle brackets for proj headers (#849)Thomas Knudsen
* Avoid using angle brackets for PROJ headers. Switching from #include <proj.h> to #include "proj.h", and correspondingly for projects.h and proj_api.h, reduces the risk of accidentally picking up a system installed older version of the header while building a new version of PROJ. * Also handle geodesic.h
2018-02-01Remove Windows CE cruft (wince/msvc80)Mateusz Loskot
Closes #582
2017-12-17Declare non-local variables as const where possibleAaron Puchert
Having non-const variables of static lifetime or even global scope is usually a bad idea. These variables are inherently constants, and this should be enforced. This required marking some functions as not modifying input parameters and marking some pointers as pointers to const. One advantage is that the compiler usually puts const static variables in a read-only code segment, so they can't be modified physically. This can be verified with `nm` (on POSIX systems). To avoid changes to the public API, functions returning non-const pointers to data tables were left intact, but the returned data may not be modified. Internally we prefer using the proj_list_* functions over the pj_get_*_ref functions, because the former return const pointers.
2017-08-07Adding info functions to proj.h API. (#551)Kristian Evers
* Adding info functions to proj.h API. Four new functions are added with this commit: proj_info(), proj_pj_info(), proj_grid_info() and proj_init_info(). Additionally four new data types are added: PJ_INFO, PJ_PROJ_INFO, PJ_GRID_INFO and PJ_INIT_INFO. The functions return the corresponding data types. These functions allows users of the PROJ.4 library to get information about various PROJ.4 entities and the library itself. The new data types are structs that contain specific information about either the library instance, a PJ instance, a grid or an init file. Together the four new functions cover a big part of the functionality in the semi-public projects.h API and should hopefully make it easier for user to migrate their code to the proj.h API in the future. Besides covering already existing functionality in the old API, this commit introduces the ability to add metadata to init-files. This is primarily added to give users a way of knowing which version of the EPSG database they are using, but it also comes in handy for other init-files. The init-file metadata is added directly to the init-file as a special "projection" called "metadata". The info projection of the epsg init-file is thus described as: <metadata> +version=9.0.0 +origin=EPSG +lastupdate=2017-01-10 The proj_init_info() function uses the internal pj_param() to read the metadata. As a consequence, "metadata" will not be available as a the name of a projection in the future. This is a reasonable price to pay considering the ease of the implementation of adding metadata to init-files this way, and of course that "metadata" is a very unlikely name for a projection in any case. A metadata tag has been added to all init-files in the nad-directory. For most only a subset of the possible parameters has been added. * Replaced calls to sprintf and strncpy with safer options. Added pj_strlcpy for internal use. * Fail gracefully when getting non-initialized PJ in proj_pj_info() * Change length of filename member in PJ_INIT_INFO and PJ_GRID_INFO to 260 (MAX_PATH)
2017-05-23pj_open_lib_ex(): protect against write stack buffer overflows.Even Rouault
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1796 Credit to OSS Fuzz
2017-03-16Add pj_find_file() function to retrieve the full filename of a proj resource ↵Even Rouault
file. Will help GDAL finding where +nadgrids=... or +geoidgrids=... resouces are located to be able to directly open them.
2017-03-15Document messy GDAL hackEven Rouault
2017-02-26Fix MSVC warnings and add /Wx to appveyor.ymlEven Rouault
2015-05-31Remove unused $Id$ keywords.Elliott Sales de Andrade
2013-06-26fix const correctness of pj_open_lib argsFrank Warmerdam
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@2372 4e78687f-474d-0410-85f9-8d5e500ac6b2
2013-06-22bulk of file api implementation complete and workingFrank Warmerdam
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@2345 4e78687f-474d-0410-85f9-8d5e500ac6b2
2011-12-15ensure we check errno before logging messages (#131)Frank Warmerdam
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@2130 4e78687f-474d-0410-85f9-8d5e500ac6b2
2010-06-11roll projCtx through various other low level functionsFrank Warmerdam
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@1856 4e78687f-474d-0410-85f9-8d5e500ac6b2
2010-06-11preliminary implementation of projCtx APIFrank Warmerdam
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@1854 4e78687f-474d-0410-85f9-8d5e500ac6b2
2010-03-03avoid warningsFrank Warmerdam
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@1827 4e78687f-474d-0410-85f9-8d5e500ac6b2
2009-01-06removed CVS log messages since they are not maintained by subversionFrank Warmerdam
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@1504 4e78687f-474d-0410-85f9-8d5e500ac6b2
2007-07-06improve searchpath clearning with pj_set_searchpath()Frank Warmerdam
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@1400 4e78687f-474d-0410-85f9-8d5e500ac6b2
2007-03-11support drive letter prefixes on win32 and related fixes (bug 1499)Frank Warmerdam
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@1392 4e78687f-474d-0410-85f9-8d5e500ac6b2
2006-11-17Uploaded PROJ.4 port for Windows CE.Mateusz Loskot
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@1377 4e78687f-474d-0410-85f9-8d5e500ac6b2
2004-09-16* src/pj_open_lib.c: added pj_set_searchpath() provided by Eric Miller.Frank Warmerdam
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@1227 4e78687f-474d-0410-85f9-8d5e500ac6b2
2002-12-14updated headersFrank Warmerdam
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@1054 4e78687f-474d-0410-85f9-8d5e500ac6b2
2002-07-08ensure clean C++ buildsFrank Warmerdam
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@1025 4e78687f-474d-0410-85f9-8d5e500ac6b2
2002-04-30improve debug outputFrank Warmerdam
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@1009 4e78687f-474d-0410-85f9-8d5e500ac6b2
2001-08-23added pj_set_finder functionFrank Warmerdam
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@976 4e78687f-474d-0410-85f9-8d5e500ac6b2
1999-03-18NewFrank Warmerdam
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@776 4e78687f-474d-0410-85f9-8d5e500ac6b2