aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2018-10-16Merge pull request #1148 from kbevers/lists-to-proj.hiso19111_devKristian Evers
Move struct definitions for proj_list_* functions to proj.h
2018-10-16Move struct definitions for proj_list_* functions to proj.hKristian Evers
With projects.h not being available to outside users anymore we need to define PJ_UNITS, PJ_ELLPS, PJ_PRIME_MERIDIANS and PJ_OPERATIONS elsewhere. Related pj_get_*_ref() functions have been removed in favour of their proj_ namespaced counterparts. char pointers have been changed to const char pointers. Resolves #983 Resolved #1147 Make char pointers const
2018-10-16Change pj_mkparam to take const char pointerKristian Evers
pj_mkparam() and pj_mkparam_ws() doesn't alter the input string should therefore be const. This will be useful when making other changes to the code base later.
2018-10-15Add Tobler-Mercator projectionIvan Veselov
2018-10-11Merge pull request #1133 from Fil/bertin1953Kristian Evers
the Bertin 1953 projection
2018-10-11Merge remote-tracking branch 'osgeo/master' into bertin1953Kristian Evers
2018-10-11Merge pull request #1144 from rouault/ntv1_fixKristian Evers
NTv1 grid shift: fix file offset for reading of shift values in ntv1_can.dat
2018-10-11Merge pull request #1142 from sphynx/proj-lcc-2sp-michiganKristian Evers
Add Lambert Conic Conformal (2SP Michigan) projection
2018-10-11Support LCC 2SP Michigan projectionIvan Veselov
2018-10-09Fix typosEven Rouault
2018-10-08Merge pull request #1137 from rouault/drop_nmakeKristian Evers
Remove nmake build system
2018-10-08NTv1 grid shift: fix file offset for reading of shift values in ntv1_can.datEven Rouault
When investigating the format of NTv1 and comparing PROJ code with the actual header of ntv1_can.dat, I discovered that the longitude & latitude shift values started at offset 192, whereas PROJ assumed that the header was 176 bytes only. This caused PROJ to use the wrong offsets values (shift of one grid sample by longitude). So the effect was moderately visible, especially on the latitude, but when comparing with NTv2, one can see that the longitude value after the fix seems to closer to NTv2. old: echo "60.5 -100.5 0" | PROJ_LIB=/usr/share/proj src/cct -d 8 +proj=pipeline +step +proj=axisswap +order=2,1 +step +proj=unitconvert +xy_in=deg +xy_out=rad +step +proj=hgridshift +grids=ntv1_can.dat +step +proj=unitconvert +xy_in=rad +xy_out=deg +step +proj=axisswap +order=2,1 60.50022624 -100.50040292 0.00000000 inf new: echo "60.5 -100.5 0" | PROJ_LIB=/usr/share/proj src/cct -d 8 +proj=pipeline +step +proj=axisswap +order=2,1 +step +proj=unitconvert +xy_in=deg +xy_out=rad +step +proj=hgridshift +grids=ntv1_can.dat +step +proj=unitconvert +xy_in=rad +xy_out=deg +step +proj=axisswap +order=2,1 60.50022403 -100.50041841 0.00000000 inf echo "60.5 -100.5 0" | PROJ_LIB=/usr/share/proj src/cct -d 8 +proj=pipeline +step +proj=axisswap +order=2,1 +step +proj=unitconvert +xy_in=deg +xy_out=rad +step +proj=hgridshift +grids=$HOME/proj/proj-datumgrid/north-america/ntv2_0.gsb +step +proj=unitconvert +xy_in=rad +xy_out=deg +step +proj=axisswap +order=2,1 60.50022348 -100.50041978 0.00000000 inf old: $ echo "80.1 -70.9 0" | PROJ_LIB=/usr/share/proj src/cct -d 8 +proj=pipeline +step +proj=axisswap +order=2,1 +step +proj=unitconvert +xy_in=deg +xy_out=rad +step +proj=hgridshift +grids=ntv1_can.dat +step +proj=unitconvert +xy_in=rad +xy_out=deg +step +proj=axisswap +order=2,1 80.10096789 -70.89746834 0.00000000 inf new: $ echo "80.1 -70.9 0" | PROJ_LIB=/usr/share/proj src/cct -d 8 +proj=pipeline +step +proj=axisswap +order=2,1 +step +proj=unitconvert +xy_in=deg +xy_out=rad +step +proj=hgridshift +grids=ntv1_can.dat +step +proj=unitconvert +xy_in=rad +xy_out=deg +step +proj=axisswap +order=2,1 80.10096858 -70.89749190 0.00000000 inf $ echo "80.1 -70.9 0" | PROJ_LIB=/usr/share/proj src/cct -d 8 +proj=pipeline +step +proj=axisswap +order=2,1 +step +proj=unitconvert +xy_in=deg +xy_out=rad +step +proj=hgridshift +grids=$HOME/proj/proj-datumgrid/north-america/ntv2_0.gsb +step +proj=unitconvert +xy_in=rad +xy_out=deg +step +proj=axisswap +order=2,1 80.10096782 -70.89749276 0.00000000 inf
2018-10-06Make PROJ_HEAD descriptions more uniformIvan Veselov
Before that, approximately half of the descriptions had a period at the end, e.g. 'Cyl.' or 'Sph.' and the other half did not have those periods. This commit drops all the dots in PROJ_HEAD descriptions.
2018-10-03Remove nmake build systemEven Rouault
2018-10-01Add a affine transformation method, and make geogoffset as a particular case ↵Even Rouault
of it (fixes #535)
2018-10-01Add geographic offset transformation method.Even Rouault
The Geographic offsets transformation adds an offset to the geographic longitude, latitude coordinates, and an offset to the ellipsoidal height. This method is normally only used when low accuracy is tolerated. It is documented as coordinate operation method code 9619 (for geographic 2D) and 9660 (for geographic 3D) in the EPSG dataset. It can also be used to implement the method Geographic2D with Height Offsets (code 9618) by noting that the input vertical component is a gravity-related height and the output vertical component is the ellispoid height (dh being the geoid undulation). It can also be used to implement the method Vertical offset (code 9616) It is used for example to transform: - from the old Greek geographic 2D CRS to the newer GGRS87 CRS - from Tokyo + JSLD69 height to WGS 84 - from Baltic 1977 height to Black Sea height It is also useful to document the implicit zero-offset transformation we do in pipelines such as +proj=pipeline +step +inv +proj=longlat +ellps=A +step +proj=longlat +ellps=B that can be explicited as +proj=pipeline +step +inv +proj=longlat +ellps=A +step +proj=geogoffset [+dlon=0 +dlat=0 +dh=0] +step +proj=longlat +ellps=B
2018-09-27cs2cs_emulation_setup: fix issue with non C-localeEven Rouault
in +towgs84 case, we use sprintf() with floating-point formatter to output the ellipsoid parameters. For a locale with decimal separtor != dot, the resulting string will not be parsed correctly by proj_atof(), leading to wrong numeric result. The fix is similar to the one done in pj_latlong_from_proj() Note for later: if using C++, we could use a locale-independent formatting solution to avoid such issue.
2018-09-24snake casePhilippe Rivière
2018-09-24Req. changes for Bertin1953:Philippe Rivière
- classification - tests - coding style
2018-09-23Fix mistakes in function commentsIvan Veselov
2018-09-22Merge pull request #1131 from kbevers/remove-misspelled-constantKristian Evers
Remove misspelled-constant PJD_ERR_UNKNOW_UNIT_ID
2018-09-22Merge pull request #1130 from kbevers/refactor-projKristian Evers
Refactor proj
2018-09-22Fix typo in Plate Carree projection name (#1132)Philippe Rivière
2018-09-21coding style (https://travis-ci.com/OSGeo/proj.4/jobs/147225960 & ↵Philippe Rivière
https://travis-ci.com/OSGeo/proj.4/jobs/147274068)
2018-09-21the Bertin 1953 projectionPhilippe Rivière
2018-09-21Remove misspelled-constant PJD_ERR_UNKNOW_UNIT_IDKristian Evers
Closes #853
2018-09-21Replace calls to pj_factors with proj_factorsKristian Evers
2018-09-21Replace calls to rtodms/dmstor with proj.h equivalentsKristian Evers
2018-09-19Merge pull request #1125 from rouault/rename_nad_as_dataKristian Evers
Rename nad/ as data/ and move nad/test* to test/old/*
2018-09-18Rename nad/ directory as data/Even Rouault
2018-09-18Only allow usage of proj_api.h if explicit consent was givenKristian Evers
We want to flag that proj_api_h is now deprecated. With this commit it is now mandatory to #define ACCEPT_USE_OF_DEPRECATED_PROJ_API_H before proj_api.h can be included. proj_api.h is used internally a bunch of places. Therefore ACCEPT_USE_OF_DEPRECATED_PROJ_API_H has been defined in projects.h and a few other necessary files to ensure that PROJ compiles. Closes #836
2018-09-18Do not install projects.hKristian Evers
In version 6 we stop exposing the deprecated projects.h API to the world outside PROJ. Closes #835
2018-09-15Bump version numbers after 5.2.0 releaseKristian Evers
2018-09-11Update release dateKristian Evers
2018-09-11Fix SONAME decrement from libproj.so.13 to libproj.so.12.Bas Couwenberg
Increment age instead of revision for added interfaces, see: https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
2018-09-10Update ABI version for 5.2 releaseKristian Evers
2018-09-07cs2cs: Always convert to degrees when angular output is received (#1112)Kristian Evers
Previous to this commit cs2cs did not convert angular output to degrees when using operations setting PJ->right = PJ_IO_UNITS_ANGULAR. This commit adopts the conventions used after the introduction of pipelines. In practice, this allows the following and similar transformations to output in degrees and not radians: ``` echo 37.3916666667 -6.9325000 | cs2cs +proj=latlong +ellps=clrk80 \ +to +proj=molodensky +ellps=clrk80 +da=-112.145 +df=-0.54750714e-4 \ +dx=-175 +dy=-23 +dz=-303 37.39 -6.93 -8.2 ```
2018-09-07cct: forward comments to outputKristian Evers
Any text written after the coordinate input will automatically be forwarded to the output stream. Text in columns before the coordinate input is discarded in the output. This works for any combination of -c, -t and -z parameters: $ echo 12 56 100 2018.0 comment comment | cct +proj=merc 1335833.8895 7522963.2411 100.0000 2018.0000 comment commen $ echo text 12 56 100 2018.0 comment | cct -c 2,3,4,5 +proj=merc 1335833.8895 7522963.2411 100.0000 2018.0000 comment $ echo text 12 56 comment | cct -c 2,3 -t0 -z0 +proj=merc 1335833.8895 7522963.2411 0.0000 0.0000 comment $ echo 12 56 comment | cct -t0 -z0 +proj=merc 1335833.8895 7522963.2411 0.0000 0.0000 comment Closes #918
2018-09-05Add -d option to proj, cs2cs and cct (#1109)Søren Holm
Specify number of decimals to display when transforming coordinates with either proj, cs2cs or cct.
2018-08-294D API: honour vto_meter / vunits for proj=longlatEven Rouault
This worked for cs2cs / pj_transform(), but not the new API
2018-08-24proj_4D_api.c: fix potential null pointer dereference. Fixes ↵Even Rouault
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10033. Credit to OSS Fuzz. master only
2018-08-24Improve numerical precision of inverse spherical mercatorKristian Evers
Complements f2b3604
2018-08-24Merge pull request #1093 from rouault/geoc_flag_fixKristian Evers
Assorted fixes related to +geoc flag handing
2018-08-23Merge pull request #1096 from rouault/fix_helmert_convention_confusionEven Rouault
[BREAKING] Helmert: add +convention=position_vector/coordinate_frame, forbids +transpose (fixes #1091)
2018-08-22Style and comment improvements to eqearth (#1102)Bojan Šavrič
2018-08-22Adding ellipsoidal equations for the Equal Earth (#1101)Bojan Šavrič
2018-08-21[BREAKING] Hermert: add +convention=position_vector/coordinate_frame, ↵Even Rouault
forbids +transpose (fixes #1091) As identified in #1091, Helmert implementation in PROJ 5.0 and 5.1 is confusing. It happens that by default it used the coordinate_frame convention, contrary to the position_vector convention used traditionaly for +towgs84. The documentation of Helmert was also wrongly specifying that the default convention was position_vector. This commit: - bans the confusing +transpose parameter - removes the concept of a default convention, since in practice both are equally found, and requires +convention as soon as a rotational term parameter is present. For translation only, convention is ignored and optional, as having no effect. - fixes all the identified uses of proj=helmert in code, doc and tests This is obviously a breaking change: - users will have to adapt their pipeline expressions - in particular, init files that would use helmert must be adapted However, as designed, the break will be explicit, and not silent.
2018-08-20Fixes for webmerc projection (fixes #1078)Even Rouault
This is intended to supersed https://github.com/OSGeo/proj.4/pull/1080 with a number of differences. What is kept from #1080 is not forcing the ellipsoid_params to be the one of a sphere. This is not required for correct coordinate computation and avoid lying on the various distorsion parameters. For better interoperability with EPSG, we also no longer force the lam0 parameter to 0, because https://www.epsg-registry.org/export.htm?gml=urn:ogc:def:method:EPSG::1024 has a provision for it, even if in practice they will always be zero phi0 should always be zero and is not used by the formulas. Another difference with the #1080 approach is that we do not force the WGS84 ellipsoid. Perhaps someone will use webmerc for another planet, even if that is a crazy idea...
2018-08-19pj_transform / cs2cs: honour +geoc flagEven Rouault
2018-08-19Remove dead code in fwd_finalize() and inv_prepare()Even Rouault
Those functions contain code specific of input != angular and output = angular which to the best of my knowledge never happens in PROJ. Looking at that code, I feel there are a number of errors in it, and anyway removing it shows absolutely no change in the test suite, which shows it is unused. I've also added exit(1) to verify that those code paths are never taken. This was found while investigating the fix for 8cfc81380617ff4a17a06a97635f77c5e9ed7d5b