Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proj_api.h access to (spheroid|other) parameters #142

Closed
proj4-bot opened this issue May 22, 2015 · 4 comments
Closed

proj_api.h access to (spheroid|other) parameters #142

proj4-bot opened this issue May 22, 2015 · 4 comments

Comments

@proj4-bot
Copy link

Reported by pramsey on 6 Feb 2012 02:09 UTC
The current access to parameters in the projPJ is via the pj_get_def() function, which returns a string. The caller then has to parse the string for the contents (which are hopefully there) it is interested in. In high performance situations, this is not optimal, particularly since the value is just sitting in the projPJ hidden away.

I have particular need to get at the major axis and eccentricity squared of the spheroid, but in general I imagine users are interested in all manner of parameters that are stored as doubles.

Migrated-From: https://trac.osgeo.org/proj/ticket/142

@proj4-bot
Copy link
Author

Comment by pramsey on 6 Feb 2012 02:13 UTC
And unfortunately it looks like even the string returns by pj_get_def() won't do for my needs (getting the minor axis and eccentricity squared), as the spheroid information is just given using shorthands. For EPSG:4267, for example,

proj_str = +proj=longlat +datum=NAD27 +no_defs +ellps=clrk66 +nadgrids=@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat

Without an API to get at this information I'll be reduced to copying the PJ struct into my code to allow Proj 4.8 support once projects.h has been removed.

@proj4-bot
Copy link
Author

Comment by pramsey on 15 Feb 2012 23:39 UTC
Yes? no? maybe so? If this goes into proj before postgis 2.0 comes out, I can ensure postgis 2.0 can read from it when proj 4.8 is released.

@proj4-bot
Copy link
Author

Comment by warmerdam on 15 Feb 2012 23:52 UTC
Patch applied with the function name pj_get_spheroid_defn() (b52b9b99 (SVN rev2160)).

Thanks!

@proj4-bot
Copy link
Author

Attachment added by pramsey on 8 Feb 2012 18:20 UTC
https://trac.osgeo.org/proj/attachment/ticket/142/proj_spheroid1.patch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant