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

Even Rouault even.rouault at spatialys.com
Tue Mar 9 12:57:21 PST 2021


Le 09/03/2021 à 21:39, Matthew Woehlke a écrit :
> On 09/03/2021 14.53, Even Rouault wrote:
>> Le 09/03/2021 à 20:43, Matthew Woehlke a écrit :
>>> 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?
>> > There is no +type=crs in it, so this is interpreted as a PROJ 
>> coordinate
>> operation, and not a CRS. But EPSG:4326 *is* a CRS (it expands to 
>> "+proj=longlat +datum=WGS84 +no_defs +type=crs" now as can be seen 
>> with the "projinfo EPSG:4326" output)
>
> What I'm hearing is "this is a meaningless, pedant-only distinction to 
> prevent being able to do useful things". That, or you aren't 
> understanding the question.

PROJ >= 6 is definitely a lot more pedant that previous version used to 
be. A CRS and a coordinate operation are not the same thing, and we 
don't want people to use them indifferently to avoid errors. 
"+proj=longlat +datum=WGS84" is a transformation that expected it input 
coordinates to be provided in radians for example, but  "+proj=longlat 
+datum=WGS84 +type=crs" is a geographic CRS whose units are degrees. So 
this "silly" flag added by the "perverse" me is there for a reason.

I'll stop answering to this thread now, as I don't like the tone it takes.

-- 
http://www.spatialys.com



More information about the PROJ mailing list