From: Alan W. Irwin <email@example.com>
To: phil rosenberg <firstname.lastname@example.org>
Cc: Andrew Ross <email@example.com>; Hezekiah M. Carty <firstname.lastname@example.org>; "email@example.com" <firstname.lastname@example.org>
Sent: Friday, 5 October 2012, 0:14
Subject: Re: [Plplot-devel] map resolution
On 2012-10-04 12:58-0700 phil rosenberg wrote:
> I just want to double check that shapefile really the correct format
to use for the built in maps. The only concern I have is that it
be slow and memory hungry to read the files because the file only
specifies min/max x/y for the entire file. If these files are not
intended for the users to see or modify then they can be taylored to
best suit the needs of PLplot rather than being "generically useful".
I have had a quick look at http://shapelib.maptools.org/shp_api.html
and it appears essentially every shape (except null and single point)
has a bounding box. So it should be straightforward to read in shapes
and select only the ones which are relevant to the area of the map you
want to plot with plmap.
I would aim just for that simple area selection capability to start.
Once you are happy with the plotted results for small shape files
where efficiency is not a concern, you might want to implement an
optimization that eliminates shapefile
rereads for the same shapefile
and same plotted area that has been specified before. I can think of
several possibilities for such an optimization, and I am sure you can
as well. However, I would strongly advise waiting to figure out the
specifics of such optimization until later. After all, the usual
programming advice is to optimize late in development rather than
early, and I think that advice is completely relevant to this case.
Alan W. Irwin
Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).
Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project
and the Linux Brochure Project (lbproject.sf.net).