Re: [GRASS-dev] Fwd: [PROJ] PROJ 6RC2

2019-02-24 Thread Markus Metz
On Sat, Feb 23, 2019 at 10:26 PM Even Rouault 
wrote:
>
> On samedi 23 février 2019 15:59:28 CET Markus Neteler wrote:
> > Hi devs,
> >
> > there is some discussion about packages that need to be patched to use
> > proj_api.h or proj.h which will no longer be available in recent PROJ.
> >
> > Is there anything to do in GRASS GIS (trunk)?
>
> From what I can see in
> https://github.com/GRASS-GIS/grass-ci/blob/master/lib/proj/do_proj.c
> Markus Metz made use of proj.h API of PROJ 5. This should still work with
PROJ
> 6.
>
> However the way of building pipelines in
> https://github.com/GRASS-GIS/grass-ci/blob/master/lib/proj/do_proj.c#L92
> from the PROJ string of the source and target CRS (PROJ strings are not a
good
> way to capture a CRS definition, mostly due to losing the original datum
> information) will be suboptimal in PROJ 6 since still using a
early-binding
> approach with WGS84 as a pivot, instead of the new late-binding
capabilities
> brought by PROJ 6.
> If GRASS stores EPSG code and/or WKT in addition/instead of PROJ strings,
then
> using proj_create_crs_to_crs() will lead to more accurace results in
> circumstances where WGS84 is not a natural pivot, like the case of
> NAD27+NVGD29 to NAD83+NAVD88 that Paul Ramsey exposed in
> http://blog.cleverelephant.ca/2019/02/proj4-postgis.html

I have seen the magic lookup you implemented in proj_create_crs_to_crs()
for PROJ 6, really impressive! It's on my TODO list to make use of
proj_create_crs_to_crs() in GRASS (for PROJ 5 it was not worth the effort
because proj_create_crs_to_crs() constructed a very simple pipeline).

GRASS already stores EPSG code if plrovided which could be enhanced to
store any SRID as supported by proj's +init=..., according to the init
files coming with RPOJ (https://proj4.org/resource_files.html#init-files).

We could also store WKT, but then I would suggest to enable this only for
PROJ6+ and store only WKT2, not WKT1.

Markus M
>
> Even
>
> --
> Spatialys - Geospatial professional services
> http://www.spatialys.com
> ___
> grass-dev mailing list
> grass-dev@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-dev
___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

Re: [GRASS-dev] Fwd: [PROJ] PROJ 6RC2

2019-02-23 Thread Even Rouault
On samedi 23 février 2019 15:59:28 CET Markus Neteler wrote:
> Hi devs,
> 
> there is some discussion about packages that need to be patched to use
> proj_api.h or proj.h which will no longer be available in recent PROJ.
> 
> Is there anything to do in GRASS GIS (trunk)?

From what I can see in 
https://github.com/GRASS-GIS/grass-ci/blob/master/lib/proj/do_proj.c
Markus Metz made use of proj.h API of PROJ 5. This should still work with PROJ 
6.

However the way of building pipelines in
https://github.com/GRASS-GIS/grass-ci/blob/master/lib/proj/do_proj.c#L92
from the PROJ string of the source and target CRS (PROJ strings are not a good 
way to capture a CRS definition, mostly due to losing the original datum 
information) will be suboptimal in PROJ 6 since still using a early-binding 
approach with WGS84 as a pivot, instead of the new late-binding capabilities 
brought by PROJ 6.
If GRASS stores EPSG code and/or WKT in addition/instead of PROJ strings, then 
using proj_create_crs_to_crs() will lead to more accurace results in 
circumstances where WGS84 is not a natural pivot, like the case of 
NAD27+NVGD29 to NAD83+NAVD88 that Paul Ramsey exposed in
http://blog.cleverelephant.ca/2019/02/proj4-postgis.html

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com
___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

Re: [GRASS-dev] Fwd: [PROJ] PROJ 6RC2

2019-02-23 Thread Markus Metz
On Sat, Feb 23, 2019 at 5:17 PM Sebastiaan Couwenberg 
wrote:
>
> On 2/23/19 3:59 PM, Markus Neteler wrote:
> > there is some discussion about packages that need to be patched to use
> > proj_api.h or proj.h which will no longer be available in recent PROJ.
>
> To clarify, the discussion is about patching packages that use
> projects.h which is no longer available in PROJ 6.
>
> As announced with the release of PROJ 5, project should use proj_api.h
> or proj.h.
>
> GRASS now uses proj_api.h which will remain available until PROJ 7, see:

GRASS now (since the code sprint in Bonn early last year) uses the new
proj.h if available, there is nothing to do to maintain compatibility with
the upcoming PROJ 6 release.

We could start making use of the new features implemented by Even,
particularly the new magic to find the best transformation from one CRS to
another CRS, i.e. the new behaviour of proj_create_crs_to_crs().

Markus M

>
>  https://github.com/OSGeo/proj.4/milestones
>
> > Is there anything to do in GRASS GIS (trunk)?
>
> Work could be started on supporting the new proj.h API.
>
> Kind Regards,
>
> Bas
>
> --
>  GPG Key ID: 4096R/6750F10AE88D4AF1
> Fingerprint: 8182 DE41 7056 408D 6146  50D1 6750 F10A E88D 4AF1
> ___
> grass-dev mailing list
> grass-dev@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-dev
___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

Re: [GRASS-dev] Fwd: [PROJ] PROJ 6RC2

2019-02-23 Thread Sebastiaan Couwenberg
On 2/23/19 3:59 PM, Markus Neteler wrote:
> there is some discussion about packages that need to be patched to use
> proj_api.h or proj.h which will no longer be available in recent PROJ.

To clarify, the discussion is about patching packages that use
projects.h which is no longer available in PROJ 6.

As announced with the release of PROJ 5, project should use proj_api.h
or proj.h.

GRASS now uses proj_api.h which will remain available until PROJ 7, see:

 https://github.com/OSGeo/proj.4/milestones

> Is there anything to do in GRASS GIS (trunk)?

Work could be started on supporting the new proj.h API.

Kind Regards,

Bas

-- 
 GPG Key ID: 4096R/6750F10AE88D4AF1
Fingerprint: 8182 DE41 7056 408D 6146  50D1 6750 F10A E88D 4AF1
___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev