Ticket #98 (new task)

Opened 2 years ago

Last modified 2 years ago

move pj_factors() into proj_api.h

Reported by: hamish Owned by: warmerdam
Priority: major Milestone:
Component: default Version: Development (trunk)
Keywords: pj_factors, projects.h, g.region, convergence angle Cc:

Description

Hi,

wrt OSGeo4W bug # 34 ( https://trac.osgeo.org/osgeo4w/ticket/34), pj_factors() is currently housed in projects.h which is apparently supposed to be a private header file.

If projects.h goes away, we need a public way of getting at pj_factors(), or an alternate way for end-user apps to get at the convergence angle value. As an example, the code in question is GRASS's g.region/printwindow.c:

 https://trac.osgeo.org/grass/browser/grass/trunk/general/g.region/printwindow.c#L586

FWIW the method I used to get at fact.conv was directly inspired by the code for the proj -v executable.

to avoid any gaps it would be best if this could happen before projects.h was removed from the install.

thanks, Hamish

Change History

  Changed 2 years ago by warmerdam

Hmm, I don't really know much about pj_factors(). It looks like the FACTORS structure would also need to be moved to proj_api.h and pj_factors() should be documented as part of moving to the public api.

follow-up: ↓ 3   Changed 2 years ago by hamish

Hi,

GRASS maintains a "gprojects.h" header file as a PROJ.4 wrapper- function middleware, I wonder if that could be a home for pj_factors() -> gpj_factors(), as far as GRASS is concerned.

 https://trac.osgeo.org/grass/browser/grass/trunk/include/gprojects.h

would it work?

That doesn't solve the general problem of public access to something which returns the convergence angle however, which I guess should be addressed.

Hamish

in reply to: ↑ 2   Changed 2 years ago by hamish

Replying to hamish:

GRASS maintains a "gprojects.h" header file as a PROJ.4 wrapper- function middleware, I wonder if that could be a home for pj_factors() -> gpj_factors(), as far as GRASS is concerned.  https://trac.osgeo.org/grass/browser/grass/trunk/include/gprojects.h would it work?

see experimental patch in  https://trac.osgeo.org/grass/changeset/45469

That doesn't solve the general problem of public access to something which returns the convergence angle however, which I guess should be addressed.

cheers, Hamish

  Changed 2 years ago by hamish

Hi,

has the file now been dropped in trunk? We are getting reports that builds using proj4 from SVN now fail. I had hoped to find a new public-home for the convergence angle and resolve this ticket and then sync + release a new GRASS before that happened..

(apparently it has been dropped, see trunk/proj/src/Makefile.in r1975. mmmph)

?

thanks, Hamish

Note: See TracTickets for help on using tickets.