Differences across v4.8 and v4.9

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Differences across v4.8 and v4.9

J Luis

Hi,

I have found these differences between proj.4 versions that I don't find  
any documentation referring them. There is one FAQ  
http://proj4.org/faq.html#why-do-i-get-different-results-with-4-5-0-and-4-6-0 
entry but is about differences between 4.5.0 and 4.6.0, whilst this is  
between 4.8 and 4.9.

The first one (between A1 and B1) is specially more troublesome because is  
the example provide in the cs2cs doc page  
(http://proj4.org/apps/cs2cs.html) that agrees with 4.8.0 and not with  
4.9.2

Joaquim

proj
Rel. 4.8.0, 6 March 2012

A1
echo 45.25919444444 -111.5 | cs2cs +proj=latlong +datum=NAD83 +to  
+proj=utm +zone=10  +datum=NAD27 -r
1402285.99      5076292.42 -0.00

A2
echo 4.897 52.371 | proj +proj=aeqd +ellps=WGS84 +units=m
384923.72       5809986.50

A3
echo 4.897 52.371 | proj +proj=robin +ellps=WGS84 +units=m
394576.51       5571243.64

-------------------------------------------------------------------------------
proj
Rel. 4.9.3, dd Month yyyy

B1
echo 45.25919444444 -111.5 | cs2cs +proj=latlong +datum=NAD83 +to  
+proj=utm +zone=10  +datum=NAD27 -r
1402292.27      5076292.65 -0.00

B2
echo 4.897 52.371 | proj +proj=aeqd +ellps=WGS84 +units=m
384537.46       5809944.81

B3
echo 4.897 52.371 | proj +proj=robin +ellps=WGS84 +units=m
394576.53       5570940.84
_______________________________________________
Proj mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/proj
Reply | Threaded
Open this post in threaded view
|

Re: Differences across v4.8 and v4.9

Even Rouault-2

On lundi 28 août 2017 17:46:23 CEST Joaquim Luis wrote:

> Hi,

>

> I have found these differences between proj.4 versions that I don't find

> any documentation referring them. There is one FAQ

> http://proj4.org/faq.html#why-do-i-get-different-results-with-4-5-0-and-4-6-

> 0 entry but is about differences between 4.5.0 and 4.6.0, whilst this is

> between 4.8 and 4.9.

>

> The first one (between A1 and B1) is specially more troublesome because is

> the example provide in the cs2cs doc page

> (http://proj4.org/apps/cs2cs.html) that agrees with 4.8.0 and not with

> 4.9.2

>

> Joaquim

>

> proj

> Rel. 4.8.0, 6 March 2012

>

> A1

> echo 45.25919444444 -111.5 | cs2cs +proj=latlong +datum=NAD83 +to

> +proj=utm +zone=10 +datum=NAD27 -r

> 1402285.99 5076292.42 -0.00

 

I do get this result with proj 4.9.3 too (actually I get 1402285.98 5076292.42 -0.00,

so a slight difference rounding), so I suspect your below 4.9.3 build has been made

without unzipping first the grids at

http://download.osgeo.org/proj/proj-datumgrid-1.6.zip

into the nad/ directory

 

You can check if grids are used with

 

echo 45.25919444444 -111.5 | PROJ_DEBUG=ON cs2cs +proj=latlong +datum=NAD83 +to +proj=utm +zone=10 +datum=NAD27 -r

 

You should see towards the end something like

 

NTv1 393x177: LL=(-142,40) UR=(-44,84)

pj_open_lib(conus): call fopen([...]/share/proj/conus) - succeeded

 

pj_apply_gridshift(): used Conterminous United States

 

 

>

> A2

> echo 4.897 52.371 | proj +proj=aeqd +ellps=WGS84 +units=m

> 384923.72 5809986.50

 

Not completely sure about that one when looking at history of

https://github.com/OSGeo/proj.4/commits/master/src/PJ_aeqd.c

 

Perhaps

https://github.com/OSGeo/proj.4/commit/2d0acd7d61374a167f532cd2851f46f63d5e09a4

or

https://github.com/OSGeo/proj.4/commit/de8d6779aaabe0c46c06b9047bc6a6a978cc0758

 

>

> A3

> echo 4.897 52.371 | proj +proj=robin +ellps=WGS84 +units=m

> 394576.51 5571243.64

>

 

I suspect the difference comes from

https://github.com/OSGeo/proj.4/commit/d856016ca1a178cc81c4474c0a6bbe78d106d012

 

I agree the https://github.com/OSGeo/proj.4/blob/master/NEWS don't mention this case nor A2.

 

--

Spatialys - Geospatial professional services

http://www.spatialys.com


_______________________________________________
Proj mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/proj
Reply | Threaded
Open this post in threaded view
|

Re: Differences across v4.8 and v4.9

Kristian Evers-2
In reply to this post by J Luis
Hi Joaquin,

For specifics about changes between versions you should consult the NEWS file in the source distribution [0],
or even better, the git commit log [1].

I tried recreating your findings with the following script:

-----------------------------------------------------------------------------------------------------------------------------------------------
#!/bin/sh

proj

echo A1
echo 45.25919444444 -111.5 | cs2cs +proj=latlong +datum=NAD83 +to +proj=utm +zone=10  +datum=NAD27 -r
echo "1402285.99      5076292.42 -0.00"
echo
echo A2
echo 4.897 52.371 | proj +proj=aeqd +ellps=WGS84 +units=m
echo "384923.72       5809986.50"
echo
echo A3
echo 4.897 52.371 | proj +proj=robin +ellps=WGS84 +units=m
echo "394576.51       5571243.64"
-----------------------------------------------------------------------------------------------------------------------------------------------

And got the following output:

-----------------------------------------------------------------------------------------------------------------------------------------------
$ ./test_proj4.9.3.sh
Rel. 4.9.3, 15 August 2016
usage: proj [ -bCeEfiIlormsStTvVwW [args] ] [ +opts[=arg] ] [ files ]
A1
1402285.98 5076292.42 -0.00
1402285.99      5076292.42 -0.00

A2
384537.46 5809944.81
384923.72       5809986.50

A3
394576.53 5570940.84
394576.51       5571243.64
-----------------------------------------------------------------------------------------------------------------------------------------------

So, I am not able to reproduce the output you get in B1, although I do get an answer very similar to A1.
This discrepancy can most likely be explained by the fact that the default UTM implementation was changed
to etmerc with version 4.9.3.

For the second example I get the same difference as you. I believe this can be explained by the improved
geodesic code that was introduced 4.9.0. The aeqd code was updated when GeographicLib [2].

Your third example I can also recreate. I believe it might be caused by a change in coefficients in the
source code [3].

For all of the three examples you've found, I would say that the reason for them is that the algorithms
have been improved (although documented poorly). The examples in the doc pages should obviously be
updated to reflect the current behaviour of PROJ.4.

/Kristian

[0] https://github.com/OSGeo/proj.4/blob/master/NEWS
[1] https://github.com/OSGeo/proj.4/commits/master
[2] https://github.com/OSGeo/proj.4/commit/de8d6779aaabe0c46c06b9047bc6a6a978cc0758
[3] https://github.com/OSGeo/proj.4/commit/d856016ca1a178cc81c4474c0a6bbe78d106d012

________________________________________
Fra: [hidden email] [[hidden email]] på vegne af Joaquim Luis [[hidden email]]
Sendt: 28. august 2017 18:46
Til: PROJ.4 and general Projections Discussions
Emne: [Proj] Differences across v4.8 and v4.9

Hi,

I have found these differences between proj.4 versions that I don't find
any documentation referring them. There is one FAQ
http://proj4.org/faq.html#why-do-i-get-different-results-with-4-5-0-and-4-6-0
entry but is about differences between 4.5.0 and 4.6.0, whilst this is
between 4.8 and 4.9.

The first one (between A1 and B1) is specially more troublesome because is
the example provide in the cs2cs doc page
(http://proj4.org/apps/cs2cs.html) that agrees with 4.8.0 and not with
4.9.2

Joaquim

proj
Rel. 4.8.0, 6 March 2012

A1
echo 45.25919444444 -111.5 | cs2cs +proj=latlong +datum=NAD83 +to
+proj=utm +zone=10  +datum=NAD27 -r
1402285.99      5076292.42 -0.00

A2
echo 4.897 52.371 | proj +proj=aeqd +ellps=WGS84 +units=m
384923.72       5809986.50

A3
echo 4.897 52.371 | proj +proj=robin +ellps=WGS84 +units=m
394576.51       5571243.64

-------------------------------------------------------------------------------
proj
Rel. 4.9.3, dd Month yyyy

B1
echo 45.25919444444 -111.5 | cs2cs +proj=latlong +datum=NAD83 +to
+proj=utm +zone=10  +datum=NAD27 -r
1402292.27      5076292.65 -0.00

B2
echo 4.897 52.371 | proj +proj=aeqd +ellps=WGS84 +units=m
384537.46       5809944.81

B3
echo 4.897 52.371 | proj +proj=robin +ellps=WGS84 +units=m
394576.53       5570940.84
_______________________________________________
Proj mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/proj
_______________________________________________
Proj mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/proj
Reply | Threaded
Open this post in threaded view
|

Re: Differences across v4.8 and v4.9

J Luis
In reply to this post by Even Rouault-2

>
>
>> The first one (between A1 and B1) is specially more troublesome because  
>> is
>
>
>
>> the example provide in the cs2cs doc page
>
>
>
>> (http://proj4.org/apps/cs2cs.html) that agrees with 4.8.0 and not with
>
>
>
>> 4.9.2
>
>
>
>>
>
>
>
>> Joaquim
>
>
>
>>
>
>
>
>> proj
>
>
>
>> Rel. 4.8.0, 6 March 2012
>
>
>
>>
>
>
>
>> A1
>
>
>
>> echo 45.25919444444 -111.5 | cs2cs +proj=latlong +datum=NAD83 +to
>
>
>
>> +proj=utm +zone=10  +datum=NAD27 -r
>
>
>
>> 1402285.99      5076292.42 -0.00
>
>
>
>
>
>
> I do get this result with proj 4.9.3 too (actually I get  
> 1402285.98 5076292.42 -0.00,
>
>
>
> so a slight difference rounding), so I suspect your below 4.9.3 build  
> has been made
>
>
>
> without unzipping first the grids at
>
>
>
> http://download.osgeo.org/proj/proj-datumgrid-1.6.zip
>
>
>
> into the nad/ directory
>


No I hadn't. I didn't know about those files. I build proj.4 from the  
Github repo and thought it had all necessary files.

Now I also get

pj_apply_gridshift(): used Conterminous United States
1402285.98      5076292.42 -0.00

but it still complains of not finding

pj_open_lib(ntv2_0.gsb): call  
fopen(C:\programs\compa_libs\proj4_GIT\nad\ntv2_0.gsb) - failed

which is not in the proj-datumgrid-1.6.zip file


>
>
>
>
>
> You can check if grids are used with
>
>
>
>
>
>
> echo 45.25919444444 -111.5 | PROJ_DEBUG=ON cs2cs  +proj=latlong  
> +datum=NAD83 +to  +proj=utm >+zone=10  +datum=NAD27 -r
>
>
>
>
>
>
> You should see towards the end something like
>
>
>
>
>
>
> NTv1 393x177: LL=(-142,40) UR=(-44,84)
>
>
>
> pj_open_lib(conus): call fopen([...]/share/proj/conus) - succeeded
>
>
>
>
>
>
> pj_apply_gridshift(): used Conterminous United States
>
>
>
>
>
>
>
>
>
>>
>
>
>
>> A2
>
>
>
>> echo 4.897 52.371 | proj +proj=aeqd +ellps=WGS84 +units=m
>
>
>
>> 384923.72       5809986.50
>
>
>
>
>
>
> Not completely sure about that one when looking at history of
>
>
>
> https://github.com/OSGeo/proj.4/commits/master/src/PJ_aeqd.c
>
>
>
>
>
>
> Perhaps
>
>
>
> https://github.com/OSGeo/proj.4/commit/2d0acd7d61374a167f532cd2851f46f63d5e09a4
>
>
>
> or
>
>
>
> https://github.com/OSGeo/proj.4/commit/de8d6779aaabe0c46c06b9047bc6a6a978cc0758
>
>
>
>
>
>
>>
>
>
>
>> A3
>
>
>
>> echo 4.897 52.371 | proj +proj=robin +ellps=WGS84 +units=m
>
>
>
>> 394576.51       5571243.64
>
>
>
>>
>
>
>
>
>
>
> I suspect the difference comes from
>
>
>
> https://github.com/OSGeo/proj.4/commit/d856016ca1a178cc81c4474c0a6bbe78d106d012
>
>
>
>
>
>
> I agree the https://github.com/OSGeo/proj.4/blob/master/NEWS don't  
> mention this case nor A2.
>
>
>
>
>
>
> --
>
>
> Spatialys - Geospatial professional services
>
>
>
> http://www.spatialys.com
_______________________________________________
Proj mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/proj
Reply | Threaded
Open this post in threaded view
|

Re: Differences across v4.8 and v4.9

J Luis
In reply to this post by Kristian Evers-2
Thanks Kristian,

The differences in A1/B1 are, like Even found, due to missing grids in the  
nad directory.

Regarding this and the others, I'm implementing proj.4 in GMT and so want  
to be sure that the discrepancies that I find meanwhile are not due to  
errors of mine.

Joaquim


> Hi Joaquin,
>
> For specifics about changes between versions you should consult the NEWS  
> file in the source distribution [0],
> or even better, the git commit log [1].
>
> I tried recreating your findings with the following script:
>
> -----------------------------------------------------------------------------------------------------------------------------------------------
> #!/bin/sh
>
> proj
>
> echo A1
> echo 45.25919444444 -111.5 | cs2cs +proj=latlong +datum=NAD83 +to  
> +proj=utm +zone=10  +datum=NAD27 -r
> echo "1402285.99      5076292.42 -0.00"
> echo
> echo A2
> echo 4.897 52.371 | proj +proj=aeqd +ellps=WGS84 +units=m
> echo "384923.72       5809986.50"
> echo
> echo A3
> echo 4.897 52.371 | proj +proj=robin +ellps=WGS84 +units=m
> echo "394576.51       5571243.64"
> -----------------------------------------------------------------------------------------------------------------------------------------------
>
> And got the following output:
>
> -----------------------------------------------------------------------------------------------------------------------------------------------
> $ ./test_proj4.9.3.sh
> Rel. 4.9.3, 15 August 2016
> usage: proj [ -bCeEfiIlormsStTvVwW [args] ] [ +opts[=arg] ] [ files ]
> A1
> 1402285.98 5076292.42 -0.00
> 1402285.99      5076292.42 -0.00
>
> A2
> 384537.46 5809944.81
> 384923.72       5809986.50
>
> A3
> 394576.53 5570940.84
> 394576.51       5571243.64
> -----------------------------------------------------------------------------------------------------------------------------------------------
>
> So, I am not able to reproduce the output you get in B1, although I do  
> get an answer very similar to A1.
> This discrepancy can most likely be explained by the fact that the  
> default UTM implementation was changed
> to etmerc with version 4.9.3.
>
> For the second example I get the same difference as you. I believe this  
> can be explained by the improved
> geodesic code that was introduced 4.9.0. The aeqd code was updated when  
> GeographicLib [2].
>
> Your third example I can also recreate. I believe it might be caused by  
> a change in coefficients in the
> source code [3].
>
> For all of the three examples you've found, I would say that the reason  
> for them is that the algorithms
> have been improved (although documented poorly). The examples in the doc  
> pages should obviously be
> updated to reflect the current behaviour of PROJ.4.
>
> /Kristian
>
> [0] https://github.com/OSGeo/proj.4/blob/master/NEWS
> [1] https://github.com/OSGeo/proj.4/commits/master
> [2]  
> https://github.com/OSGeo/proj.4/commit/de8d6779aaabe0c46c06b9047bc6a6a978cc0758
> [3]  
> https://github.com/OSGeo/proj.4/commit/d856016ca1a178cc81c4474c0a6bbe78d106d012
>
> ________________________________________
> Fra: [hidden email] [[hidden email]]  
> på vegne af Joaquim Luis [[hidden email]]
> Sendt: 28. august 2017 18:46
> Til: PROJ.4 and general Projections Discussions
> Emne: [Proj] Differences across v4.8 and v4.9
>
> Hi,
>
> I have found these differences between proj.4 versions that I don't find
> any documentation referring them. There is one FAQ
> http://proj4.org/faq.html#why-do-i-get-different-results-with-4-5-0-and-4-6-0
> entry but is about differences between 4.5.0 and 4.6.0, whilst this is
> between 4.8 and 4.9.
>
> The first one (between A1 and B1) is specially more troublesome because  
> is
> the example provide in the cs2cs doc page
> (http://proj4.org/apps/cs2cs.html) that agrees with 4.8.0 and not with
> 4.9.2
>
> Joaquim
>
> proj
> Rel. 4.8.0, 6 March 2012
>
> A1
> echo 45.25919444444 -111.5 | cs2cs +proj=latlong +datum=NAD83 +to
> +proj=utm +zone=10  +datum=NAD27 -r
> 1402285.99      5076292.42 -0.00
>
> A2
> echo 4.897 52.371 | proj +proj=aeqd +ellps=WGS84 +units=m
> 384923.72       5809986.50
>
> A3
> echo 4.897 52.371 | proj +proj=robin +ellps=WGS84 +units=m
> 394576.51       5571243.64
>
> -------------------------------------------------------------------------------
> proj
> Rel. 4.9.3, dd Month yyyy
>
> B1
> echo 45.25919444444 -111.5 | cs2cs +proj=latlong +datum=NAD83 +to
> +proj=utm +zone=10  +datum=NAD27 -r
> 1402292.27      5076292.65 -0.00
>
> B2
> echo 4.897 52.371 | proj +proj=aeqd +ellps=WGS84 +units=m
> 384537.46       5809944.81
>
> B3
> echo 4.897 52.371 | proj +proj=robin +ellps=WGS84 +units=m
> 394576.53       5570940.84
> _______________________________________________
> Proj mailing list
> [hidden email]
> http://lists.maptools.org/mailman/listinfo/proj
> _______________________________________________
> Proj mailing list
> [hidden email]
> http://lists.maptools.org/mailman/listinfo/proj
_______________________________________________
Proj mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/proj
Reply | Threaded
Open this post in threaded view
|

Re: Differences across v4.8 and v4.9

Kristian Evers-2
> Regarding the new API, ... I'm counting on Even because we are accessing  
proj.4 via GDAL.

In that case, never mind. I just wanted to put it on your radar in case you were unaware and interacting directly with PROJ.4. I am sure the features we are working on will show up in GDAL as well at some point in the future.

/Kristian

-----Oprindelig meddelelse-----
Fra: Joaquim Luis [mailto:[hidden email]]
Sendt: 28. august 2017 20:01
Til: Kristian Evers <[hidden email]>
Emne: Re: SV: [Proj] Differences across v4.8 and v4.9


> In that case, are you aware that we are introducing a new API to PROJ.4  
> with the next version (that will be released soon)?
> I would suggest you use the new API if you are if you haven't used  
> PROJ.4 in your application previously.

Yes, I've been following the discussions and curious how it's going to be  
implemented (I'm a Geophysicist who works in plate kinematics from time to  
time, though on the scales of Ma for which Euler poles do not always  
exactly agree with GPS ones).

Regarding the new API, ... I'm counting on Even because we are accessing  
proj.4 via GDAL.
_______________________________________________
Proj mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/proj