Hi Alan
In that case I misread the documentation I thought each file had a bounding box.
 
All good for shapefiles then.
 
So in terms of implimentation, what would be the way ahead? If the intention would be to eventually replace the current maps with shapefile versions then are we happy that the core API will have a dependancy on shapelib (presumably the only alternative would be to fork our own version into the PLplot development tree)?
I guess the current API needs to not change, but how will we decide whether a user wants to use a shapefile or the old style maps? Could be a CMAKE flag and a #define at library compile time or different file names for the two types. If we made a shapelib version of the old style maps then I guess a CMAKE flag would suffice and be totally transparent to the end user. We could then add aditional maps as we saw fit.
 
Sorry for so many questions.
 
Phil

From: Alan W. Irwin <irwin@beluga.phys.uvic.ca>
To: phil rosenberg <philip_rosenberg@yahoo.com>
Cc: Andrew Ross <andrewross@users.sourceforge.net>; Hezekiah M. Carty <hezekiahcarty@users.sourceforge.net>; "plplot-devel@lists.sourceforge.net" <plplot-devel@lists.sourceforge.net>
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 may
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".


Hi Phil:

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
__________________________
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 (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__________________________

Linux-powered Science
__________________________