{"action":"created","comment":{"url":"https://api.github.com/repos/OSGeo/proj.4/pulls/comments/85660226","pull_request_review_id":6363816,"id":85660226,"diff_hunk":"@@ -182,27 +262,93 @@ PJ_OBSERVATION pj_apply (PJ *P, enum pj_direction direction, PJ_OBSERVATION obs)\n /* Measure internal consistency - in forward or inverse direction */\n double pj_roundtrip(PJ *P, enum pj_direction direction, int n, PJ_OBSERVATION obs);\n \n-\n int pj_show_triplet (FILE *stream, const char *banner, PJ_TRIPLET point);\n \n-/* Constructor for the OBSERVATION object */\n+PJ *pj_pj (PJ_CONTEXT *ctx, char *definition);\n+PJ *pj_pj_argv (PJ_CONTEXT *ctx, int argc, char **argv);\n+\n+\n+/* Initializer for the OBSERVATION object */\n PJ_OBSERVATION pj_observation (\n     double x, double y, double z, double t,\n     double o, double p, double k,\n     int id, unsigned int flags\n );\n \n+#ifndef PJ_OBSERVATION_C\n+extern const PJ_OBSERVATION pj_observation_error;\n+extern const PJ_OBSERVATION pj_observation_null;\n+#endif\n+\n #ifndef TODEG\n #define TODEG(rad)  ((rad)*180.0/M_PI)\n #endif\n #ifndef TORAD\n #define TORAD(deg)  ((deg)*M_PI/180.0)\n #endif\n \n-#endif /* ndef PROJECTS_H */\n+\n+\n+\n+/* This is mostly a direct copy of (parts of) the proj_api header, but with cleaned up name space */\n+\n+#define PJ_VERSION 493\n+\n+\n+PJ_CONTEXT *pj_ctx (PJ *P);\n+PJ_CONTEXT *pj_ctx_alloc(void);\n+\n+void  pj_set_ctx (PJ *, PJ_CONTEXT *);\n+void  pj_ctx_free (PJ_CONTEXT *);\n+int   pj_ctx_get_errno (PJ_CONTEXT *);\n+void  pj_ctx_set_errno (PJ_CONTEXT *, int);\n+void  pj_ctx_set_debug (PJ_CONTEXT *, int);\n+void  pj_ctx_set_logger (PJ_CONTEXT *, void (*)(void *, int, const char *));\n+void  pj_ctx_set_app_data (PJ_CONTEXT *, void * );\n+void *pj_ctx_get_app_data (PJ_CONTEXT *);\n+\n+/* file reading api, like stdio */\n+typedef int *PJ_FILE;\n+struct pj_fileapi;\n+typedef struct pj_fileapi PJ_FILEAPI;\n+struct pj_fileapi {\n+    PJ_FILE  (*fopen)(PJ_CONTEXT *ctx, const char *filename, const char *access);\n+    size_t   (*fread)(void *buffer, size_t size, size_t nmemb, PJ_FILE *file);\n+    int      (*fseek)(PJ_FILE *file, long offset, int whence);\n+    long     (*ftell)(PJ_FILE *file);\n+    void     (*fclose)(PJ_FILE *file);\n+};\n+\n+void        pj_ctx_set_fileapi (PJ_CONTEXT *, PJ_FILEAPI *);\n+PJ_FILEAPI *pj_ctx_get_fileapi (PJ_CONTEXT *);\n+PJ_FILEAPI *pj_get_default_fileapi();\n+\n+PJ_FILE  pj_ctx_fopen  (PJ_CONTEXT *ctx, const char *filename, const char *access);","path":"src/proj.h","position":280,"original_position":280,"commit_id":"072eaf01f691d8babc804f98fef1b8da76967d2b","original_commit_id":"072eaf01f691d8babc804f98fef1b8da76967d2b","user":{"login":"rouault","id":1192433,"avatar_url":"https://avatars.githubusercontent.com/u/1192433?v=3","gravatar_id":"","url":"https://api.github.com/users/rouault","html_url":"https://github.com/rouault","followers_url":"https://api.github.com/users/rouault/followers","following_url":"https://api.github.com/users/rouault/following{/other_user}","gists_url":"https://api.github.com/users/rouault/gists{/gist_id}","starred_url":"https://api.github.com/users/rouault/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rouault/subscriptions","organizations_url":"https://api.github.com/users/rouault/orgs","repos_url":"https://api.github.com/users/rouault/repos","events_url":"https://api.github.com/users/rouault/events{/privacy}","received_events_url":"https://api.github.com/users/rouault/received_events","type":"User","site_admin":false},"body":"Do we need those pj_ctx_fopen() and the like in the public API ? Looks like they should be used only by the proj.4 implementation","created_at":"2016-10-30T13:52:24Z","updated_at":"2016-10-30T14:04:27Z","html_url":"https://github.com/OSGeo/proj.4/pull/445#discussion_r85660226","pull_request_url":"https://api.github.com/repos/OSGeo/proj.4/pulls/445","_links":{"self":{"href":"https://api.github.com/repos/OSGeo/proj.4/pulls/comments/85660226"},"html":{"href":"https://github.com/OSGeo/proj.4/pull/445#discussion_r85660226"},"pull_request":{"href":"https://api.github.com/repos/OSGeo/proj.4/pulls/445"}}},"pull_request":{"url":"https://api.github.com/repos/OSGeo/proj.4/pulls/445","id":91521405,"html_url":"https://github.com/OSGeo/proj.4/pull/445","diff_url":"https://github.com/OSGeo/proj.4/pull/445.diff","patch_url":"https://github.com/OSGeo/proj.4/pull/445.patch","issue_url":"https://api.github.com/repos/OSGeo/proj.4/issues/445","number":445,"state":"open","locked":false,"title":"Pipeline plus api - in continuation of the Genereic Coordinates pull request","user":{"login":"busstoptaktik","id":5608365,"avatar_url":"https://avatars.githubusercontent.com/u/5608365?v=3","gravatar_id":"","url":"https://api.github.com/users/busstoptaktik","html_url":"https://github.com/busstoptaktik","followers_url":"https://api.github.com/users/busstoptaktik/followers","following_url":"https://api.github.com/users/busstoptaktik/following{/other_user}","gists_url":"https://api.github.com/users/busstoptaktik/gists{/gist_id}","starred_url":"https://api.github.com/users/busstoptaktik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/busstoptaktik/subscriptions","organizations_url":"https://api.github.com/users/busstoptaktik/orgs","repos_url":"https://api.github.com/users/busstoptaktik/repos","events_url":"https://api.github.com/users/busstoptaktik/events{/privacy}","received_events_url":"https://api.github.com/users/busstoptaktik/received_events","type":"User","site_admin":false},"body":"This PR continues the work on a rationalized (i.e. better namespaced) API, and also, as another step down the road to implementing transformation pipelines, reintrodices the PJ_cart.c cartesian/ellipsoidal converter, previously discussed in a former PR.\r\n\r\nRegarding the API improvements, the full story is in the comments in proj.h, which I, for completeness, include below:\r\n\r\n           Purpose:  Revised, experimental API for PROJ.4, intended as the foundation\r\n           for added geodetic functionality.\r\n\r\n           The original proj API (defined in projects.h) has grown organically\r\n           over the years, but it has also grown somewhat messy.\r\n\r\n           The same has happened with the newer high level API (defined in\r\n           proj_api.h): To support various historical objectives, proj_api.h\r\n           contains a rather complex combination of conditional defines and\r\n           typedefs. Probably for good (historical) reasons, which are not\r\n           always evident from today's perspective.\r\n\r\n           This is an evolving attempt at creating a re-rationalized API\r\n           with primary design goals focused on sanitizing the namespaces.\r\n           Hence, all symbols exposed are being moved to the pj_ namespace,\r\n           while all data types are being moved to the PJ_ namespace.\r\n\r\n           Please note that this API is *orthogonal* to  the previous APIs:\r\n           Apart from some inclusion guards, projects.h and proj_api.h are not\r\n           touched - if you do not include proj.h, the projects and proj_api\r\n           APIs should work as they always have.\r\n\r\n           A few implementation details:\r\n\r\n           Apart from the namespacing efforts, I'm trying to eliminate three\r\n           proj_api elements, which I have found especially confusing.\r\n\r\n           FIRST and foremost, I try to avoid typedef'ing away pointer\r\n           semantics. I agree that it can be occasionally useful, but I\r\n           prefer having the pointer nature of function arguments being\r\n           explicitly visible.\r\n\r\n           Hence, projCtx has been replaced by PJ_CONTEXT *.\r\n\r\n           SECOND, I try to eliminate cases of information hiding implemented\r\n           by redefining data types to void pointers.\r\n\r\n           I prefer using a combination of forward declarations and typedefs.\r\n           Hence:\r\n               typedef void *projCtx;\r\n           Has been replaced by:\r\n               struct projCtx_t;\r\n               typedef struct projCtx_t PJ_CONTEXT;\r\n           This makes it possible for the calling program to know that the\r\n           PJ_CONTEXT data type exists, and handle pointers to that data type\r\n           without having any idea about its internals.\r\n\r\n           (obviously, in this example, struct projCtx_t should also be moved\r\n           to struct pj_ctx some day...)\r\n\r\n           THIRD, I try to eliminate implicit type punning. Hence this API\r\n           introduces the OBSERVATION data type, for generic coordinate and\r\n           ancillary data handling.\r\n\r\n           It includes the PJ_SPATIOTEMPORAL and PJ_TRIPLET unions\r\n           making it possible to make explicit the previously used\r\n           \"implicit type punning\", where a XY is turned into a LP by\r\n           re#defining both as UV, behind the back of the user.\r\n\r\n           The bare essentials API presented here follows the PROJ.4\r\n           convention of sailing the coordinate to be reprojected, up on\r\n           the stack (\"call by value\"), and symmetrically returning the\r\n           result on the stack. Although the OBSERVATION object is 4 times\r\n           as large as the traditional XY and LP objects, timing results\r\n           have shown the overhead to be very reasonable.\r\n\r\n           See pj_proj_test.c for an example of how to use the API.\r\n\r\n           Author:   Thomas Knudsen, <thokn@sdfe.dk>","created_at":"2016-10-30T13:16:01Z","updated_at":"2016-10-30T14:04:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"66b7da611d81411c8750719ee3569eae4a9f8422","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/OSGeo/proj.4/pulls/445/commits","review_comments_url":"https://api.github.com/repos/OSGeo/proj.4/pulls/445/comments","review_comment_url":"https://api.github.com/repos/OSGeo/proj.4/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OSGeo/proj.4/issues/445/comments","statuses_url":"https://api.github.com/repos/OSGeo/proj.4/statuses/072eaf01f691d8babc804f98fef1b8da76967d2b","head":{"label":"busstoptaktik:pipeline_plus_api","ref":"pipeline_plus_api","sha":"072eaf01f691d8babc804f98fef1b8da76967d2b","user":{"login":"busstoptaktik","id":5608365,"avatar_url":"https://avatars.githubusercontent.com/u/5608365?v=3","gravatar_id":"","url":"https://api.github.com/users/busstoptaktik","html_url":"https://github.com/busstoptaktik","followers_url":"https://api.github.com/users/busstoptaktik/followers","following_url":"https://api.github.com/users/busstoptaktik/following{/other_user}","gists_url":"https://api.github.com/users/busstoptaktik/gists{/gist_id}","starred_url":"https://api.github.com/users/busstoptaktik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/busstoptaktik/subscriptions","organizations_url":"https://api.github.com/users/busstoptaktik/orgs","repos_url":"https://api.github.com/users/busstoptaktik/repos","events_url":"https://api.github.com/users/busstoptaktik/events{/privacy}","received_events_url":"https://api.github.com/users/busstoptaktik/received_events","type":"User","site_admin":false},"repo":{"id":71816919,"name":"proj.4","full_name":"busstoptaktik/proj.4","owner":{"login":"busstoptaktik","id":5608365,"avatar_url":"https://avatars.githubusercontent.com/u/5608365?v=3","gravatar_id":"","url":"https://api.github.com/users/busstoptaktik","html_url":"https://github.com/busstoptaktik","followers_url":"https://api.github.com/users/busstoptaktik/followers","following_url":"https://api.github.com/users/busstoptaktik/following{/other_user}","gists_url":"https://api.github.com/users/busstoptaktik/gists{/gist_id}","starred_url":"https://api.github.com/users/busstoptaktik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/busstoptaktik/subscriptions","organizations_url":"https://api.github.com/users/busstoptaktik/orgs","repos_url":"https://api.github.com/users/busstoptaktik/repos","events_url":"https://api.github.com/users/busstoptaktik/events{/privacy}","received_events_url":"https://api.github.com/users/busstoptaktik/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/busstoptaktik/proj.4","description":"PROJ.4 - Cartographic Projections Library","fork":true,"url":"https://api.github.com/repos/busstoptaktik/proj.4","forks_url":"https://api.github.com/repos/busstoptaktik/proj.4/forks","keys_url":"https://api.github.com/repos/busstoptaktik/proj.4/keys{/key_id}","collaborators_url":"https://api.github.com/repos/busstoptaktik/proj.4/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/busstoptaktik/proj.4/teams","hooks_url":"https://api.github.com/repos/busstoptaktik/proj.4/hooks","issue_events_url":"https://api.github.com/repos/busstoptaktik/proj.4/issues/events{/number}","events_url":"https://api.github.com/repos/busstoptaktik/proj.4/events","assignees_url":"https://api.github.com/repos/busstoptaktik/proj.4/assignees{/user}","branches_url":"https://api.github.com/repos/busstoptaktik/proj.4/branches{/branch}","tags_url":"https://api.github.com/repos/busstoptaktik/proj.4/tags","blobs_url":"https://api.github.com/repos/busstoptaktik/proj.4/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/busstoptaktik/proj.4/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/busstoptaktik/proj.4/git/refs{/sha}","trees_url":"https://api.github.com/repos/busstoptaktik/proj.4/git/trees{/sha}","statuses_url":"https://api.github.com/repos/busstoptaktik/proj.4/statuses/{sha}","languages_url":"https://api.github.com/repos/busstoptaktik/proj.4/languages","stargazers_url":"https://api.github.com/repos/busstoptaktik/proj.4/stargazers","contributors_url":"https://api.github.com/repos/busstoptaktik/proj.4/contributors","subscribers_url":"https://api.github.com/repos/busstoptaktik/proj.4/subscribers","subscription_url":"https://api.github.com/repos/busstoptaktik/proj.4/subscription","commits_url":"https://api.github.com/repos/busstoptaktik/proj.4/commits{/sha}","git_commits_url":"https://api.github.com/repos/busstoptaktik/proj.4/git/commits{/sha}","comments_url":"https://api.github.com/repos/busstoptaktik/proj.4/comments{/number}","issue_comment_url":"https://api.github.com/repos/busstoptaktik/proj.4/issues/comments{/number}","contents_url":"https://api.github.com/repos/busstoptaktik/proj.4/contents/{+path}","compare_url":"https://api.github.com/repos/busstoptaktik/proj.4/compare/{base}...{head}","merges_url":"https://api.github.com/repos/busstoptaktik/proj.4/merges","archive_url":"https://api.github.com/repos/busstoptaktik/proj.4/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/busstoptaktik/proj.4/downloads","issues_url":"https://api.github.com/repos/busstoptaktik/proj.4/issues{/number}","pulls_url":"https://api.github.com/repos/busstoptaktik/proj.4/pulls{/number}","milestones_url":"https://api.github.com/repos/busstoptaktik/proj.4/milestones{/number}","notifications_url":"https://api.github.com/repos/busstoptaktik/proj.4/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/busstoptaktik/proj.4/labels{/name}","releases_url":"https://api.github.com/repos/busstoptaktik/proj.4/releases{/id}","deployments_url":"https://api.github.com/repos/busstoptaktik/proj.4/deployments","created_at":"2016-10-24T18:04:54Z","updated_at":"2016-10-24T18:04:56Z","pushed_at":"2016-10-30T13:00:48Z","git_url":"git://github.com/busstoptaktik/proj.4.git","ssh_url":"git@github.com:busstoptaktik/proj.4.git","clone_url":"https://github.com/busstoptaktik/proj.4.git","svn_url":"https://github.com/busstoptaktik/proj.4","homepage":"http://proj.osgeo.org","size":139601,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"OSGeo:master","ref":"master","sha":"e3e5b78b95df592adf1ade34185db7f7d5ee6a30","user":{"login":"OSGeo","id":1058467,"avatar_url":"https://avatars.githubusercontent.com/u/1058467?v=3","gravatar_id":"","url":"https://api.github.com/users/OSGeo","html_url":"https://github.com/OSGeo","followers_url":"https://api.github.com/users/OSGeo/followers","following_url":"https://api.github.com/users/OSGeo/following{/other_user}","gists_url":"https://api.github.com/users/OSGeo/gists{/gist_id}","starred_url":"https://api.github.com/users/OSGeo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OSGeo/subscriptions","organizations_url":"https://api.github.com/users/OSGeo/orgs","repos_url":"https://api.github.com/users/OSGeo/repos","events_url":"https://api.github.com/users/OSGeo/events{/privacy}","received_events_url":"https://api.github.com/users/OSGeo/received_events","type":"Organization","site_admin":false},"repo":{"id":36057261,"name":"proj.4","full_name":"OSGeo/proj.4","owner":{"login":"OSGeo","id":1058467,"avatar_url":"https://avatars.githubusercontent.com/u/1058467?v=3","gravatar_id":"","url":"https://api.github.com/users/OSGeo","html_url":"https://github.com/OSGeo","followers_url":"https://api.github.com/users/OSGeo/followers","following_url":"https://api.github.com/users/OSGeo/following{/other_user}","gists_url":"https://api.github.com/users/OSGeo/gists{/gist_id}","starred_url":"https://api.github.com/users/OSGeo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OSGeo/subscriptions","organizations_url":"https://api.github.com/users/OSGeo/orgs","repos_url":"https://api.github.com/users/OSGeo/repos","events_url":"https://api.github.com/users/OSGeo/events{/privacy}","received_events_url":"https://api.github.com/users/OSGeo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OSGeo/proj.4","description":"PROJ.4 - Cartographic Projections Library","fork":false,"url":"https://api.github.com/repos/OSGeo/proj.4","forks_url":"https://api.github.com/repos/OSGeo/proj.4/forks","keys_url":"https://api.github.com/repos/OSGeo/proj.4/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OSGeo/proj.4/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OSGeo/proj.4/teams","hooks_url":"https://api.github.com/repos/OSGeo/proj.4/hooks","issue_events_url":"https://api.github.com/repos/OSGeo/proj.4/issues/events{/number}","events_url":"https://api.github.com/repos/OSGeo/proj.4/events","assignees_url":"https://api.github.com/repos/OSGeo/proj.4/assignees{/user}","branches_url":"https://api.github.com/repos/OSGeo/proj.4/branches{/branch}","tags_url":"https://api.github.com/repos/OSGeo/proj.4/tags","blobs_url":"https://api.github.com/repos/OSGeo/proj.4/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OSGeo/proj.4/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OSGeo/proj.4/git/refs{/sha}","trees_url":"https://api.github.com/repos/OSGeo/proj.4/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OSGeo/proj.4/statuses/{sha}","languages_url":"https://api.github.com/repos/OSGeo/proj.4/languages","stargazers_url":"https://api.github.com/repos/OSGeo/proj.4/stargazers","contributors_url":"https://api.github.com/repos/OSGeo/proj.4/contributors","subscribers_url":"https://api.github.com/repos/OSGeo/proj.4/subscribers","subscription_url":"https://api.github.com/repos/OSGeo/proj.4/subscription","commits_url":"https://api.github.com/repos/OSGeo/proj.4/commits{/sha}","git_commits_url":"https://api.github.com/repos/OSGeo/proj.4/git/commits{/sha}","comments_url":"https://api.github.com/repos/OSGeo/proj.4/comments{/number}","issue_comment_url":"https://api.github.com/repos/OSGeo/proj.4/issues/comments{/number}","contents_url":"https://api.github.com/repos/OSGeo/proj.4/contents/{+path}","compare_url":"https://api.github.com/repos/OSGeo/proj.4/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OSGeo/proj.4/merges","archive_url":"https://api.github.com/repos/OSGeo/proj.4/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OSGeo/proj.4/downloads","issues_url":"https://api.github.com/repos/OSGeo/proj.4/issues{/number}","pulls_url":"https://api.github.com/repos/OSGeo/proj.4/pulls{/number}","milestones_url":"https://api.github.com/repos/OSGeo/proj.4/milestones{/number}","notifications_url":"https://api.github.com/repos/OSGeo/proj.4/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OSGeo/proj.4/labels{/name}","releases_url":"https://api.github.com/repos/OSGeo/proj.4/releases{/id}","deployments_url":"https://api.github.com/repos/OSGeo/proj.4/deployments","created_at":"2015-05-22T07:00:08Z","updated_at":"2016-10-28T13:31:20Z","pushed_at":"2016-10-30T13:16:01Z","git_url":"git://github.com/OSGeo/proj.4.git","ssh_url":"git@github.com:OSGeo/proj.4.git","clone_url":"https://github.com/OSGeo/proj.4.git","svn_url":"https://github.com/OSGeo/proj.4","homepage":"http://proj.osgeo.org","size":147247,"stargazers_count":222,"watchers_count":222,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":104,"mirror_url":null,"open_issues_count":66,"forks":104,"open_issues":66,"watchers":222,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/OSGeo/proj.4/pulls/445"},"html":{"href":"https://github.com/OSGeo/proj.4/pull/445"},"issue":{"href":"https://api.github.com/repos/OSGeo/proj.4/issues/445"},"comments":{"href":"https://api.github.com/repos/OSGeo/proj.4/issues/445/comments"},"review_comments":{"href":"https://api.github.com/repos/OSGeo/proj.4/pulls/445/comments"},"review_comment":{"href":"https://api.github.com/repos/OSGeo/proj.4/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OSGeo/proj.4/pulls/445/commits"},"statuses":{"href":"https://api.github.com/repos/OSGeo/proj.4/statuses/072eaf01f691d8babc804f98fef1b8da76967d2b"}}}}
{"actor":{"display_login":"rouault"}}