Menu
CTAN
Comprehensive TeX Archive Network
Cover Upload Browse

Direc­tory tex-archive/graphics/pstricks/contrib/pst-geo/data

Project pst-geo-compress                                 2009-07-30
========================

Author: Heiko Oberdiek <oberdiek@uni-freiburg.de>
License is LPPL 1.3c,
  maintainance status: maintained
  current maintainer: author

Files:
  README (this file)
  pst-geo-compress.pl
  pst-geo-decompress.pl

Requirements: Ghostscript >= 8.56 (if prediction is used)

`pst-geo' (CTAN:graphics/pstricks/contrib/pst-geo/) comes with
huge data files:
  CTAN:graphics/pstricks/contrib/pst-geo/data/data.tgz
  CTAN:graphics/pstricks/contrib/pst-geo/dataII/dataII.tgz
Unpacked the data files consume about 134 MB.

The data files (files with extension `.dat') are PostScript files.
PostScript supports compression and decompression via filter.
The Perl script `pst-geo-compress.pl' compresses the data files
using the /FlateEncode filter and adds code to decompresses the file,
if read by a PostScript interpreter. Now the space requirements of
the data files is about 24 MB.

Caveat: Filters /FlateEncode and /FlateDecode require
PostScript language level 3 (supported by ghostscript).
(LZW compression don't need language level 3, but
the compression is less effective.)

Size reduction details:
* Much unnecessary white space is removed.
* Some comments are removed (especially number comments
  in .dat files of data.tgz), the remaining comments are preserved
  (especially city names).
* /FlateEncode filter.
* PNG prediction (method `up') is used for most of the files.
  Spaces at line ends are added to fill the space up to
  to the columns count. This improves the prediction,
  because these files contains long lists of sorted coordinate pairs.
  The prediction columns count is also the maximal line length,
  because of a ghostscript bug:

Ghostscript has a bug regarding prediction, it is fixed in
version 8.56 (2007-03-14):

| 2006-12-11T17:30:53.980862Z L. Peter Deutsch
|
| Fixes bug: the PNG predictor filters produced incorrect data for the last
| pixel of each row.  (The encoder and decoder had matching bugs, so
| encode+decode produced the correct result!)  Fixes a diff in PS3 CET
| 23-12U-1.

By having each line at the same length, the last byte of a row
has always the same value (end of line character). This does
not trigger this bug (tested with gs 7.07/8.64).

After compression the files aren't human-readable any more.
The Perl script `pst-geo-decompress.pl' can be used to
decompress a data file.

Both scripts know option -h that prints a short usage screen.
Option --gscmd allows to configure the ghostscript programm call,
if the automatic ghostscript isn't sufficient.

`pst-geo-compress.pl' is called inside the directory where
the data files are present. Options `-1' and `-2' choose
between the files from `data.tgz' and `dataII.tgz'.

`pst-geo-decompress.pl' expects the data file to decompress.
If an output file is given, the result is stored there. Otherwise
standard output is used.

History:
  2009-07-30 v1.0 First release
  2009-07-30 v1.1:
    * Workaround for ghostscript bug added:
      * Files that are compressed with prediction have
        equal line length.
      * Removing comments (except for city data files)
      * Obsolete option --prediction is therefore removed
    * Adding standalone test mode (option `--test').

Files

Name Size Date Notes
README 3273 2009-08-28 09:47
aus.dat 14063 2009-08-28 09:46
c-cap.dat 5877 2009-08-28 10:29
c-sub.dat 7049 2009-08-28 09:46
canada.dat 33816 2009-08-28 09:46
capitales.tex 2079 2008-07-07 08:39
capitales3d.tex 2283 2008-08-16 10:57
capitals.dat 2901 2009-08-28 09:46
cities.data 97486 2008-03-24 06:57
cities.tex 71422 2007-12-23 03:52
citycapitals.dat 4928 2008-07-07 08:39
citysub.dat 6552 2009-08-28 09:46
convert.py 2452 2007-12-23 03:52
corse.dat 669 2009-08-28 09:46
france.dat 4174 2009-08-28 09:46
mex.dat 14638 2009-08-28 09:46
pborder.dat 368124 2009-08-28 09:46
pcoast.dat 173738 2009-08-28 09:46
pisland.dat 175634 2009-08-28 09:46
plake.dat 43780 2009-08-28 09:46
pst-geo-compress.pl 10775 2009-08-28 09:25
pst-geo-decompress.pl 3244 2009-08-28 09:25
rhone.dat 2809 2009-08-28 09:46
ridge.dat 20669 2009-08-28 09:46
river.dat 155831 2009-08-28 09:46
seine.dat 4283 2009-08-28 09:46
transfrm.dat 10673 2009-08-28 09:46
trench.dat 14945 2009-08-28 09:46
usa.dat 35437 2009-08-28 09:46
villesFrance.tex 1671 2007-12-23 03:52
villesFrance3d.tex 1843 2008-06-28 09:52
villesItalia.tex 4153 2007-12-23 03:52
villesItalia3d.tex 4545 2008-06-28 09:51
wfraczon.dat 176080 2009-08-28 09:46
wmaglin.dat 358703 2009-08-28 09:46
Guest Book Sitemap Contact