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

Matthew Woehlke mwoehlke.floss at gmail.com
Tue Mar 9 11:43:47 PST 2021


On 09/03/2021 13.33, Even Rouault wrote:
> Le 09/03/2021 à 19:18, Matthew Woehlke a écrit :
>> In PROJ 4, 4326 is "+proj=longlat +datum=WGS84 +no_defs +ellps=WGS84". 
>> If I use that with proj_create, I get something usable. What's the 
>> difference?
> 
> PROJ >= 6 now makes a difference between a CRS and a coordinate 
> operation. A PROJ string without +type=crs is assumed to be a coordinate 
> operation, and with +type=crs to be a CRS.
> 
> The old PROJ.4 definitions without +type=crs depending on the context 
> could be used as a CRS definition or a coordinate operation. PROJ >= 6 
> now requires to be explicit to avoid that confusion. You can't use a CRS 
> like "EPSG:4326" with proj_trans(). That doesn't make sense. A CRS 
> doesn't define a coordinate operation by itself.

I sort-of get that, but I don't think you actually answered the 
question. What does "+proj=longlat +datum=WGS84 +no_defs +ellps=WGS84" 
mean than I *can* use it with proj_trans?

>> p.s. How do I get that definition in PROJ 5? In PROJ 4, I could use 
>> pj_get_def. (See also https://stackoverflow.com/questions/66533885.)
>
> Use proj_as_proj_string(). That can work on both CRS and coordinate 
> operation (when there's a single coordinate operation actually contained 
> in proj_create_crs_to_crs() )

Why is *that* not documented as the replacement for pj_get_def?

-- 
Matthew


More information about the PROJ mailing list