While updating the Debian package to 2.017 the lintian QA tool reported pod2man errors for PDL::Transform::Proj4 because it detected:
POD ERRORS
Hey! The above document had some coding errors, which are explained below:
Around line 2412:
Expected '=item *'
Around line 2414:
Expected '=item *'
Around line 2416:
Expected '=item *'
Around line 2418:
Expected '=item *'
This is caused by the sch projection using a slightly different description format which results in the following Proj4.pm:
=head2 t_proj_sch
Autogenerated transformation function for Proj4 projection code sch.
The full name for this projection is Spherical Cross-track Height.
Projection Parameters
=for options
=over 4
=item
=item
=item
=item
=item
=item
=item h_0
=item phdg_0
=item plat_0
=item plon_0
=back
=cut
sub t_proj_sch
{ PDL::Transform::Proj4::sch->new( @_ ); }
The sch projection using spaces around the equal signs unlike most other projections:
PROJ_HEAD(sch, "Spherical Cross-track Height") "\n\tMisc\n\tplat_0 = ,plon_0 = , phdg_0 = ,[h_0 = ]";
See: https://github.com/OSGeo/proj.4/blob/4.9.3/src/PJ_sch.c#L51
Most other projection use a description format like:
PROJ_HEAD(aea, "Albers Equal Area") "\n\tConic Sph&Ell\n\tlat_1= lat_2=";
See: https://github.com/OSGeo/proj.4/blob/4.9.3/src/PJ_aea.c#L36
I've patched the POD generator to skip empty parameters to work around this issue (attached as manpage-has-errors-from-pod2man.patch):
--- a/Lib/Transform/Proj4/Proj4.pd
+++ b/Lib/Transform/Proj4/Proj4.pd
@@ -469,7 +469,7 @@ ENDTEMPLATE
{
$doc_param_list .= "\nProjection Parameters\n\n=for options\n\n=over 4\n\n";
foreach my $param ( sort @{ $projection->{PARAMS}->{PROJ} } )
- { $doc_param_list .= "=item $param\n\n"; }
+ { next if(!$param); $doc_param_list .= "=item $param\n\n"; }
$doc_param_list .= "=back\n\n";
}
The sch projection should also be fixed to use a more consistent description format for which I'll send a patch to Proj4 upstream. This should avoid the need to fix the parsing in Alien::Proj4.
Please consider applying manpage-has-errors-from-pod2man.patch to handle the issue with Proj4 >= 4.9.3-RC1.
For the changes in Proj4 to make the description consistent, see:
https://github.com/OSGeo/proj.4/pull/427
The PR has been merged which should get the fix included in Proj4 4.9.4 expected to be released in about a year (4.9.3 was released last month).
Last edit: Bas Couwenberg 2016-10-09
Patch applied and should appear in the next PDL distribution release. Thanks.