Hi Alan
I was just considering that one negative brought up regarding supporting shapefiles was the addition of extra dependencies. I sometimes feel (probably wrongly) that if only a basic bit of functionality is needed then it's easier to have a basic bit of code that does exactly what I (we) need rather than add an extra dependency and API (and possibly build system) that goes overboard on features. Maybe this is a Windows hangup as a lot of open source code has build systems which are rather biased towards linux (even CMAKE setups can be guilty of this) so sometimes it can be a few days work to get a library built and more than once I've been totally unable to do it. This kind of thing is often quite daunting to people who haven't done it before.

I'll have a look at shapelib anyway and see if compiles easily on Windows.


From: Alan W. Irwin <irwin@beluga.phys.uvic.ca>
To: phil rosenberg <philip_rosenberg@yahoo.com>
Cc: "plplot-devel@lists.sourceforge.net" <plplot-devel@lists.sourceforge.net>
Sent: Sunday, 30 September 2012, 0:52
Subject: Re: [Plplot-devel] map resolution

But do you really want to re-implement a shapefile parser? The MIT or
LGPL dual-licensed shapelib library (see
http://shapelib.maptools.org/) does that already and provides an API
to read shapefile data from shapefile files.

Just out of curiosity about the build system and the platforms that
shapelib could be built on, I downloaded that library from
http://download.osgeo.org/shapelib/shapelib-1.3.0.tar.gz (released in
April this year so it appears shapelib is still under active
development).  The README in the top-level directory basically says
that the build is done with make on Linux and nmake on Windows with
very few files involved in the build.  So that already looks like you
will be able to build it on your Windows platform, but as a matter of
convenience (and also something valuable you could donate back to the
shapelib project) it would probably be worth your while to update that
build system to CMake so that the code can be built out of the box for
virtually every Windows platform and Unix platform.

The debian packages for the shapelib package (containing shapelib
applications) and libshp1 package (containing the shapelib library)
shows no external dependencies other than the C library.  So that
should make for an extremely simple build (as already implied by the
above README) which should be easy to generalize with CMake.

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