[PROJ] Creating projection *not* from full init string?

Matthew Woehlke mwoehlke.floss at gmail.com
Tue Mar 9 09:59:52 PST 2021


I'm trying (again) to port some geodetic conversion code from the PROJ 4 
API.

Our system uses EPSG identifiers to specify coordinate systems. (Yes, 
yes, I'm — vaguely — aware we should also be using epochs, but frankly 
it's a struggle to get our users to even be *aware* that there are 
different coordinate systems, and more often than not we have to assume 
4326 because we don't know *anything*. Getting anything more is simply 
not practical.)

This was manageable in PROJ 4. With 6.3.2, however, I can't seem to 
create a *usable* projection except by specifying a complete init 
string. Calling `proj_create(0, "EPSG:4326")` gives back a non-null 
pointer, but any calls to proj_trans fail, proj_info gives back an empty 
definition, and proj_angular_{in,out}put all return 0.

How do I create a usable projection from an EPSG code? (Or *anything* 
other than a full init string? I get the same results with e.g. "WGS 84".)

-- 
Matthew


More information about the PROJ mailing list