On 2012-10-05 05:56-0700 phil rosenberg wrote:

> 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)?

We handle it exactly like how we handle other core dependencies. If
they are found we use them, if not we emit a CMake WARNING message,
drop the functionality that is affected and continue. Andrew has
already done most of this work with his CMake find module for the
shapelib library.  I have now (revision 12241) done slightly more and
propagated the HAVE_SHAPELIB CMake variable to a C macro with the same
name.  So just surround your additions to plmap with

#ifdef HAVE_SHAPELIB
#endif

and you don't have to be concerned further with this question.

> I guess the current API needs to not change.

I suggest you repurpose the plmap "type" string to a string that
instead refers normally to a shapefile filename following the exact
semantics of pszShapeFile documented in SHPOpen (see
http://shapelib.maptools.org/shp_api.html). So normally that would be
the path + basename + either the .shp or .shx suffix or "just be the
path plus the basename of the pair." That would work fine as long as
you reserved "globe", "usa", "cglobe", and "usaglobe" filenames to be
used exactly as before for as long as we keep that old functionality.

> but how will we decide whether a user
wants to use a shapefile or the old style maps?

See above suggestion.  Eventually, we might want to convert the
old-style maps to shapefiles, but we don't have to do that for now
with the above reserved name idea so let's put off that decision until
later.

I hope this answers the last of your general background concerns so
you can concentrate on your planned implementation of additions to the
plmap internals so it will work for shapefiles if the filename
(currently called the type argument) is not one of the reserved words.
I am very much looking forward to your patch to that effect along with
a practical demonstration of plmap decorating and transforming a
good-looking shapefile map.

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