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 <ir...@beluga.phys.uvic.ca>
To: phil rosenberg <philip_rosenb...@yahoo.com> 
Cc: Andrew Ross <andrewr...@users.sourceforge.net>; Hezekiah M. Carty 
<hezekiahca...@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
__________________________
------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to