[Proj] Original Latex Files?

Thomas Knudsen knudsen.thomas at gmail.com
Wed Mar 16 10:33:27 EST 2016


I was looking into this with Kristian Evers this morning - and it actually
shows to be quite easy to extract Gerald's original map projection
illustrations.

The figures are embedded by dvips, directly from original files (probably
generated using his MAPGEN cartographic system,
https://pubs.er.usgs.gov/publication/70015083) directly into the PostScript
files, where they are neatly delineated by "BeginDocument"/"EndDocument"
pairs:

As an example, the Mercator projection illustration starts approximately
2500 lines into the OF90-284.ps file downloaded from
http://download.osgeo.org/proj/from_kai/ with the quite readable line:

%%BeginDocument: plotter -d eps cylind/merc.ov

Hence, a meaningful file name can be generated from the last element of the
BeginDocument line.

Writing a plain PostScript header and appending everything from
BeginDocument to EndDocument is just a matter of a few lines of AWK, and
converting to tightly cropped PDF-format can be done using the ps2pdf
function from Ghostscript, in combination with Heiko Oberdiek's pdfcrop
thing.

Everything is shrink-wrapped into 35 lines of AWK, included below (Howard:
would it be worth submitting a pull request, adding this to the proj
documentation effort?)

#
# Extract Gerald Evenden's original map projection demo plots
# from the original proj.4 postscript documentation
#
# Usage:
#     awk -f extract_gie_figures.awk  OF90-284.ps  PROJ.4.3.ps
#
# Thomas Knudsen,
#     Danish Ministry of Energy, Utilities and Climate
#     Agency for Data Supply and Efficiency
#
# thokn at sdfe.dk 2016-03-16
#

$1=="%%BeginDocument:" {
    # The original file name (style: cylind/merc.ov) is the last arg on the
BeginDocument line
    base = $NF
    # Remove prepended path ("cylind/") and file extension (".ov")
    sub (".ov", "", base)
    sub (/(.+)\//,"", base)

    # write PostScript header to output file
    print "%!PS-Adobe-2.0" >base ".ps"
}

# Write embedded plot file to PostScript output file
$1=="%%BeginDocument:", $1=="%%EndDocument" {
    print $0 >>base ".ps"
}

# Convert plot file to cropped pdf
$1=="%%EndDocument" {
    system ("ps2pdf " base ".ps intermediate.pdf")
    system ("pdfcrop intermediate.pdf " base ".pdf")
}




Thomas Knudsen
Geodesist, PhD
Geographical references
thokn at sdfe.dk

Danish Ministry of Energy, Utilities and Climate
Agency for Data Supply and Efficiency


2016-03-16 11:53 GMT+01:00 Kristian Evers <kreve at sdfe.dk>:

> Postscript files for the PROJ.4.3.*.pdf files can be found here:
>
> http://download.osgeo.org/proj/from_kai/
>
> I've been trying to find the code that was used to create the plots in the
> files, but haven't had any luck yet. It should be possible to extract the
> plots from the ps-file though.
>
>
> Kristian Evers
> Geophysicist
> Geographical references
> kreve at sdfe.dk
>
> Danish Ministry of Energy, Utilities and Climate
> Agency for Data Supply and Efficiency
>
>
>
> -----Oprindelig meddelelse-----
> Fra: proj-bounces at lists.maptools.org [mailto:
> proj-bounces at lists.maptools.org] På vegne af Norman Vine
> Sendt: 16. marts 2016 10:57
> Til: PROJ.4 and general Projections Discussions
> Emne: Re: [Proj] Original Latex Files?
>
>
> this seems to be a mirror copy of Gerald's last USGS distribution site
> charon.er.usgs.gov
> http://ftp.funet.fi/pub/graphics/packages/MapProjections/
>
> there are a couple of postscript files there that might be useful
> PROJ.4.?.ps.Z Intermim documentation of release 4 proj.  Use as
>                 a supplement to OF 90-284 (listed above).  PostScript for
>                 300dpi, black-on-white printers.
>
> proj.OF90-284.ps directory of PostScript files to create proj's OF doc-
>                 umentation on a 300bpi, black-on-white laser printer.
>
>
> On Mar 15, 2016, at 1:28 PM, "Agnew, Duncan" <dagnew at ucsd.edu> wrote:
>
> > Two notes:
> >
> > The first, and probably the second, document are publications of the US
> government and thus in the public
> > domain.
> >
> > It isn't difficult to extract the text from the .pdf file, but putting
> all the LaTeX formatting back would be a lot
> > of work -- though it would not be difficult to "parallelize" this, with
> a little community organization.
> > ________________________________________
> > From: proj-bounces at lists.maptools.org [proj-bounces at lists.maptools.org]
> on behalf of support at mnspoint.com [support at mnspoint.com]
> > Sent: Tuesday, March 15, 2016 10:11 AM
> > To: PROJ.4 and general Projections Discussions
> > Subject: Re: [Proj] Original Latex Files?
> >
> > Hello,
> >
> > I haven't heard anything about Gerald since many years and also Frank
> > been very silent lately. I suppose Frank might have an idea if anybody
> > here? I think Gerald is (if anywhere) more active on the "libproj" side?
> > .. if Proj4 was written sometime 1970 first time .. you can count years
> > your self etc..
> >
> > If nothing else helps it might be a good time to write them again using
> > the originals as basis?! (And also compile them all together into a
> > single manual) .. ??!! Most likely no copyright problems exsist if
> > original writers are mentioned etc. etc..
> >
> > It is also possible that any original manual files are lost for ever?!
> > .. lucky we have the source code still! :)
> >
> > Regards: Janne.
> >
> > ------------
> >
> > Howard Butler kirjoitti 14.03.2016 20:52:
> >> Gerald (or maybe others)?
> >>
> >> As part of the website and documentation remodel for proj.4, it would
> >> be really nice if we could collect the content of the various PDFs
> >> into a living document.
> >>
> >> ftp://ftp.remotesensing.org/proj/OF90-284.pdf
> >> ftp://ftp.remotesensing.org/proj/proj.4.3.pdf
> >> ftp://ftp.remotesensing.org/proj/proj.4.3.I2.pdf
> >>
> >> Would it be possible to get the source latex files for these
> >> documents, and would you support us including them as part of a larger
> >> documentation effort for http://proj4.org?
> >>
> >> Thanks much,
> >>
> >> Howard
> > _______________________________________________
> > Proj mailing list
> > Proj at lists.maptools.org
> > http://lists.maptools.org/mailman/listinfo/proj
> > _______________________________________________
> > Proj mailing list
> > Proj at lists.maptools.org
> > http://lists.maptools.org/mailman/listinfo/proj
>
> _______________________________________________
> Proj mailing list
> Proj at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/proj
> _______________________________________________
> Proj mailing list
> Proj at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/proj
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/proj/attachments/20160316/4b62f393/attachment-0001.htm 


More information about the Proj mailing list