diff options
| author | Kai Pastor <dg0yt@darc.de> | 2019-09-11 06:57:34 +0000 |
|---|---|---|
| committer | Kai Pastor <dg0yt@darc.de> | 2019-09-11 06:57:34 +0000 |
| commit | 5172637ea70c42a41497fa6566ad3d497801aea4 (patch) | |
| tree | 5598ccebc8ab733c51965da8f0a17a9312275424 /docs/source/development | |
| parent | 3eb57808324907aebd8d4dfba0f9d6edcb0f97f8 (diff) | |
| download | PROJ-5172637ea70c42a41497fa6566ad3d497801aea4.tar.gz PROJ-5172637ea70c42a41497fa6566ad3d497801aea4.zip | |
Make migration code examples compile
Diffstat (limited to 'docs/source/development')
| -rw-r--r-- | docs/source/development/migration.rst | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/source/development/migration.rst b/docs/source/development/migration.rst index df622ecb..98dbe570 100644 --- a/docs/source/development/migration.rst +++ b/docs/source/development/migration.rst @@ -22,7 +22,7 @@ We start by writing the program for PROJ 4: #include <proj_api.h> main(int argc, char **argv) { - projPJ pj_merc, pj_latlong; + projPJ pj_merc, pj_longlat; double x, y; if (!(pj_longlat = pj_init_plus("+proj=longlat +ellps=clrk66")) ) @@ -33,7 +33,7 @@ We start by writing the program for PROJ 4: while (scanf("%lf %lf", &x, &y) == 2) { x *= DEG_TO_RAD; /* longitude */ y *= DEG_TO_RAD; /* latitude */ - p = pj_transform(pj_longlat, pj_merc, 1, 1, &x, &y, NULL ); + int p = pj_transform(pj_longlat, pj_merc, 1, 1, &x, &y, NULL); printf("%.2f\t%.2f\n", x, y); } @@ -74,7 +74,7 @@ The same program implemented using PROJ 6: /* latitude for geographic CRS, and easting, northing for projected */ /* CRS. If instead of using PROJ strings as above, "EPSG:XXXX" codes */ /* had been used, this might had been necessary. */ - PJ* P_for_GIS = proj_normalize_for_visualization(C, P); + PJ* P_for_GIS = proj_normalize_for_visualization(PJ_DEFAULT_CTX, P); if( 0 == P_for_GIS ) { proj_destroy(P); return 1; |
