Plotting global shapefiles - Small area, big file size

From: Thierry Corti <tcorti_at_nyahnyahspammersnyahnyah>
Date: Mon Jan 31 2011 - 08:16:33 MST

Hi there,

When using a global shapefile to plot rivers, lakes and country borders for
a small area (such as Switzerland), the resulting PDF gets huge (4.2 MB),
even though the information content is small. Even Adobe Acrobat can reduce
the size to 24 KB without affecting the quality (see attached PDF).

My guess is that the file become so big because the script (see attachment)
plots all lines and polygon, regardless of the position in or out of the
plotting area.

How can I improve on this? How can I plot just the lines and polygons I need
and leave everything outside the intended area away? I see three angles to
attack this one from:

   1. Is “gc_inout” the right function for this? It seems a rather crude way
of doing it.

   2. Is there a way to configure the plotting resources to produce a
smaller file size?

   3. Is there a way to replace the internal NCL database for MapPlot?

Is one of these three solutions a winner? Or am I looking at three red

Thank you for your help.




ETH Zurich

Thierry Corti

Center for Climate Systems Modeling (C2SM)

CHN M 15.1

Universitaetstrasse 16

8092 Zurich, Switzerland <>

+41 44 633 91 04 phone

+41 44 633 10 58 fax

ncl-talk mailing list
List instructions, subscriber options, unsubscribe:

Received on Mon Jan 31 08:16:42 2011

This archive was generated by hypermail 2.1.8 : Mon Jan 31 2011 - 10:38:24 MST