PBSmapping Changes
==================================================
Authors:
   JTS = Jon T. Schnute    ACB = Alex Couture-Beil
    NB = Nicholas Boers     DC = Denis Chabot
    RH = Rowan Haigh
Contributors:
    RB = Roger Bivand       PW = Paul Wessel
    CG = Chris Grandin      FA = Franklin Antonio
    AM = Alan Murta        NLK = Nicholas J Lewin-Koh
    AJ = Angus Johnson      SA = Sean Anderson
CRAN:
   PBR = Prof Brian Ripley
    UL = Uwe Ligges
--------------------------------------------------

2.74.1 (2024-09-25) [Rcheck=T, Rbuild=T]
  * Documentation
    + Removed offending (forbidden) hyperlink from `addBubbles.Rd' (RH 240925)
    + Added `dot-create.Rd' to repo (not sure how its absence passed the check in the first place) (RH 240925)

2.74.0 (2024-09-24) [Rcheck=T, Rbuild=T]
  * Documentation
    + Passes tests on Github using workflow `R-CMD-check.yaml' (RH 240924)
      - (i) macos-latest, (ii) windows-latest (release), (iii) ubuntu-latest (devel), (iv) ubuntu-latest (release), (v) ubuntu-latest (oldrel-1)
    + Cannot find a way to check package on all operating systems using SVN
      - Equivalent in Gitub is : pbs-mapping/.github/workflows/R-CMD-check.yaml

2.73.8 (2024-09-17) [Rcheck=T, Rbuild=T]
  * Documentation
    + Attempt to add a path containing `pdflatex' onto path for Sweave vignette. (RH 240909)
      - various attempts but Rhub still craps out on missing 'pdflatex'
    + Adding R code into Rnw vignette raised another issue about missing tangle (RH 240916)
      + Followed example of package `gglasso' by adding Rnw, R and PDF into `inst/doc' directory

2.73.7 (2024-09-05) [Rcheck=T, Rbuild=T]
  * C code
    + Managed to see the PBR error message running the R-devel check on Linux with the help of CG (RH 240905)
      - CG update the Linux C-compiler : upgraded gcc and g++ from 11.4.0 to version 14.1.0
      - CG had to build it from source to do so on this OS : compiler compiled using flex and yacc (bison)
    + Changed `clipperWrapper' code
      - changing `#include <Rdefines.h>' to `#include <Rinternals.h>' did not work
      - adding `#include <Rinternals.h>' before `#include <Rdefines.h>' did not work
      - changed `mkChar' to `Rf_mkChar', `classgets' to `RF_classgets', and `error' to `perror' as per suggestions in `00install.out' report.
      - ran `.PBSfigs()' in R-devel for Windows 10 Enterprise 22H2 and Linux Ubuntu 22.04 LTS (aka Jammy Jellyfish) without errors.

2.73.6 (2024-09-03) [Rcheck=T, Rbuild=F]
  * C code
    + Issue from CRAN is causing problems (but of course it does not show up in local checks)
      - Compilation fails when using _R_CXX_USE_NO_REMAP_=true, which compiles C++ code with R_NO_REMAP defined;
      - See chapter `The R API: entry points for C code' in `Writing R Extensions' for more information.
    + Tried various tweaks to see the issue that PBR sees:
      - set environmental variable _R_CXX_USE_NO_REMAP_=true globally and in RdevCheck.bat : no change
      - set R_Tools=%R_Base%\Rtools44 in RdevCheck.bat (had been demoted to Rtools42 for rstan conniptions a while back) : no change
  * Documentation
    + Fixed a number of Rd issues seen by Rdevcheck (RH 240903)
    + Updated short vignette to fix a broken hyperlink (RH 240904)

2.73.5 (2024-04-11) [Rcheck=F, Rbuild=F]
  * Documentation
    + Repatriated dot functions (no longer banished to the namespace nether region); new documentation files:
      - `dot-validate.Rd' for `.validate' auxiliary functions (RH 240311)
      - `dot-add.Rd' for `.add' auxiliary functions (RH 240311)
      - `dot-fix.Rd' for `.fix' auxiliary functions (RH 240321)
      - `dot-calc.Rd' for `.calc' auxiliary functions (RH 240321)
      - `dot-get.Rd' for `.get' auxiliary functions (RH 240325)
      - `dot-mat2df.Rd' for `.fix' auxiliary function (RH 240326)
      - `dot-check.Rd for `.check' auxiliary functions (RH 240326)
    + Inserted auxiliary (dot) functions as aliases in existing Rd file: 
      - amalgamated `clipPolys', `clipLines', and `.clip' in `clipPolys.Rd' (RH 240321)
      - added `.closestPoint' to `calcConvexHull.Rd' (RH 240325)
      - added `.expandEdges' to `calcVoronoi.Rd' (RH 240325)
      - added `.plotMaps' and `.initPlotRegion' to `plotMap.Rd' (RH 240325)
      - added `.insertNAs' and `.rollupPolys' to `addPolys.Rd' (RH 240326)
      - added `.insertNAs', `.preparePolyProps', and `.rollupPolys' to `addPolys.Rd' (RH 240326)

2.73.4 (2023-11-03) [Rcheck=T, Rbuild=T, CRAN version]
  * Documentation
    + Fixed broken URL in `addBubbles.Rd' (thanks UW)
    + Finished the history of changes in the `ChangeLog.txt' file.

2.73.3 (2023-10-30) [Rcheck=T, Rbuild=T]
  * Documentation
    + Added Rd documentation files for .PBmapEnv and a few functions. (RH 231030)
    + Updated Rd files with NB's new particulars.
  * R code
    + Removed (temporarily) function `importShapefile' until/if RB's C code can be incorporated into PBSmapping. (RH 231027)

2.73.2 (2022-09-06) [Rcheck=T, Rbuild=T]
  * Documentation
    + Updated `calcArea.Rd' and `convUL.Rd' so that `\emph' does not appear in math rendering.

2.73.1 (2022-07-12) [Rcheck=T, Rbuild=T]
  * R code
    + Modified R function `.addBubblesLegend' to satisfy CRAN
      - From : if (class(legend.pos) == "numeric") {
      - To   : if (inherits(legend.pos, "numeric")) {
  * C code
    + Modified `clipperWrapper' to bring Sint and Sfloat into scope.
      - moved `typedef int Sint; typedef double Sfloat;' from `clipperWrapper.cpp' to `clipperWrapper.h'
    + Updated copyright dates in PBSmapping C source files.
  * Documentation
    + Updated a few Rd files with broken hyperlinks to Internet addresses.

2.73.0 (2021-01-11) [Rcheck=T, Rbuild=T]
  * R code
    + Modified function `addBubbles' to accept negative data values. (RH 210111)
    + Added new functions `RGB2RYB' and `RYB2RGB' based on the equations in Sugita and Takahashi (2015,2017). (RH 210106)
      - Converts between the Red-Green-Blue and Red-Yellow-Blue colour schemes.
    + Modified function `addCompass' to include magnetic pole positions from the NOAA's IGRF-13 model (1900-2025). (RH 210104)

2.72.1 (2019-03-14) [Rcheck=T, Rbuild=T]
  * C code
    + Removed 'undeclared' SEXP variables from `importGSHHS' (see below) because they had been defined on lines 62:63. (RH 190314)
      - RH fumbling around in C lead to R crashing when importGSHHS() was called.
    + Changed the PROTECT and UNPROTECT calls in `clipperWrapper.cpp' and `convGSHHS.c'. (RH 190313)
      - Disabled 'protectCount' in `clipperWrapper.cpp' because CRAN's rchk cannot determine whether stacks are imbalanced.
      - Added undeclared SEXP variables to function `importGSHHS' in `convGSHHS.c'.
      - Updated copyright date ranges in relevant C files.
  * R code
    + Modified function `refocusWorld' for datasets that don't extend into Antaractica, e.g. borders (RH 190314)
      - Added line 'if (any(is.Ant)) {' before processing polygons with >100 vertices that lie south of -60 degrees latitude.
    + Changed `is.na()' to `all(is.na())' in function addBubbles. (RH 190313)
      - Rdevcheck choked on this example, but this may be only because it is the first example and there is another issue.
    + Modified function `makeGrid' to create hexagons in a pattern consistent with that of rectangles. (RH 190104)
      - If argument `byrow=T', rectangles and hexagons have PIDs that increment by column, otherwise by row.
      - Changed default value of argument `type' from `square' to `rectangle'.

2.72.0 (2018-11-23) [Rcheck=T, Rbuild=T]
  * R code
    + Modified function `makeGrid' to alternatively construct a regular hexagonal tesselation. (RH 181120)
      - Default: type='square'; alternative: type='hexagon'; no triangular tesselation at present.
      - The hexagonal grid can either be by row (pointy topped) or by column (flat topped).
    + Add new functions `rotatePolys' and `rotateEvents' to rotate maps clockwise. (RH 181115)
      - Suggestion from one of the reviewers of the Redstripe Rockfish assessment.
      - Spurred by implementation of ggplot's annoying ability to rotate maps in PBS groundfish package `gfsynopsis'.

2.71.1 (2018-10-26) [Rcheck=F, Rbuild=F]
  * R code
    + Modified function `refocusWorld' (RH 181026)
      - Added in new code to detect Antarctica, expand it, and clip it.

2.71.0 (2018-09-07) [Rcheck=T, Rbuild=F]
  * R code
    + Modified function `.validateData' (RH 180910)
      - Keys created from > 2 columns (e.g., PID, SID, POS) were no longer being created properly.
      - Orphaned hole check now only occurs if `polys' is actually a PolySet.
    + Modified function 'importShapefile' to use the modified function 'placeHoles', if called to do so. (RH 180906)
    + Modified function '.is.in' to report when all points lies on a boundary (RH 180906)
      - There are holes is some solids that exactly define solids elsewhere.
    + Modified function `placeHoles' in 'extraCode.r' (RH 180906)
      - This function was using '.calcOrientation' inappropriately sometimes because
      -   PBSmapping outer contours (solids) and inner contours (holes) do not rely on 
      -   GIS standards of clockwise or counterclockwise tracing to determine the contour type.
      - Modified function can now use either the orientation method or behaviour documented 
      -   in the User's Guide: solids have POS increasing, holes have POS decreasing.
    + Promoted 'is.in' subfunction to a hidden dot function usable by all functions. (RH 180828)
      - The function now uses the PBSmapping C function 'findPolys' rather than relying on sp::point.in.polygon.
    + Modified function '.validateData' to check for orphaned holes and to notify the user of their existence. (RH 180828)
      - Issue arose when user Uli brought to light a set of polygons with 1 solid followed by 5 holes completely outside the solid.
      - The object most likely was intended to portray 6 solids.
      - This anomalous polygon came from using Google's OpenStreetMap folowed by a call to maptools::SpatialPolygons2PolySet.
    + Separated functions into three distinct R files: (RH 180824)
      - 'PBSmapping.r' contains the original suite of documented functions (more or less) for PBSmapping.
      - 'extraFuns.r' contains any code that was added to PBSmapping after JTS and NB departed for better places.
      - 'dotFuns.r' contains all the hidden dot functions (not documented).

## Below: Functional categories for R code follow those in Table F.1 :
## -- Import, Plotting, Computational, Object-related, Data sets

2.70.5 (2018-06-05) [Rcheck=T, Rbuild=T]
  * Plotting
    + Added explicit argument `xpd=TRUE' to polygon commands in `.plotMaps' and `addPolys'. (RH 180605)
      - The polygon command was not filling in polygons properly on Windows devga device when going through examples in `.PBSfigs'.
  * C code
    + Changed line 721 in `clipper.cpp' from `std::memset(e, 0, sizeof(TEdge));' to `*e = { };' on the advice of NB and his C++ wizard friend. (RH 180601)
      - Response to PBR's gcc8 check:
      - clipper.cpp:721:34: warning: 'void* memset(void*, int, size_t)' clearing an object of non-trivial type 'struct ClipperLib::TEdge'; use assignment or value-initialization instead [-Wclass-memaccess]
  * Documentation
    + Changed format of ChangeLog to a standard that can be read by the function `readClog' in pkg `PBStools'. (RH 171027)
    + Replaced `index.html' with `Links.html' in ../inst/doc because R build replaces the former with its own version. (RH 171003)

2.70.4 (2017-06-28)
  * C code
    + Made changes to `init.c', 'PBSmapping.h|c', `clipperWrapper.h|cpp', `convGSHHS.c'; added new header file `convGSHHS.h'. (NB 170628)
  * Examples
    + Made minor changes to function `.PBSfigs'. (RH 170628)
  * Computational
    + Changed call in `calcVoronoi' from  `deldir::deldir' to `deldir' as it seemed to mess up the CRAN check for deldir's registered
      - Fortran calls when launched from the Rd example for `calcVoronoi'. (RH 170627)
      - The problem was not reproducible so I'm not sure what happened. 
      - Potential compatibility issue: a Windows binary for `deldir' was downloaded for R-3.2.2 Patched and used for R-devel
      - before deldir was downloaded directly through the R-devel update menu.

2.70.3 (2017-06-26)
  * C code
    + Registered C routines (new CRAN request) using RB's maptools `init.c' as a template. (NB/RH 170626)
  * Documentation
    + Updated the User's Guide to use Arial font to be more consistent with DFO CSAS and Canadian Technical Reports. (RH 170622)

2.70.2 (2017-04-10)
  * Documentation
    + Updated the User's Guide `PBSmapping-UG.pdf (RH 170410)
    + Updated the vignette `PBSmappingIntro.Rnw'. (RH 170406)
    + Changed backticks ` in DESCRIPTION to single quotes ' (Kurt Hornik 2016-09-20)
    + You need to set the BINPREF variable in etc/.../Makeconf and you can omit the ? (UL 2016-04-18)
      - Old: BINPREF ?= c:/Rtools/mingw_64/bin/
      - New: BINPREF = C:/Apps/R/Rtools/mingw_64/bin/

2.70.1 (2016-04-04)
  * Graphics
    + Added a new function `addCompass' that can add a compass rose to a map. (RH 160401)
  * Computational
    + Added a new function `calcGCdist' to calculate great-circle distance. (RH 160401)
  * Documentation
    + Updated `PBSmappingIntro.Rnw' (RH 160331)

2.70.0 (2015-08-12)
  * Documentation
    + New version format x.y.z
    + Changed 2.69 to 2.70.0

2.69  2015-04-23
  * Documentation
    + Last minute updates before another attempt to post on CRAN. (RH 150423)
  * C code
    + Addressed warning when DEBUG == 1 regarding signed/unsigned comparison. (NB 150409)
    + Removed use of the token pasting operator (##). (NB 150409)
  * Documentation
    + Modified `joinPolys.Rd' to illustrate the `DIFF' operation between polyA (A,B) and polyB (C,D). (RH 150330)
    + Updated `PBSmapping-UG.pdf' (and no longer includes Rd appendix because easily available on CRAN). (RH 150224)
    + Declared S3methods for `print' and `summary' in the NAMESPACE file, as required by CRAN. (RH 150217)
    + Updated `importGSHHS.Rd' to reflect changes made to function and to give 20 examples for various aprts of world. (RH 150216)
  * Import
    + Modified extensively `importGSHHS' to deal with various problems encountered by users (wrapping, border problems, etc.). (RH 150212)
  * Computational
    + Modified `refocusWorld' to return the `xlim' used in the refocus as an attribute called `rf.xlim' (for use in `importGSHHS'). (RH 150211)
  * C code
    + Updated Clipper to 6.2.1 and added (disabled) dbg output to clipperWrapper.cpp. (NB 150207)
      - We received a bug report regarding joinPolys.  After significant testing/tracing, the bug appears to exist within Clipper 5.1.6.
      - Rather than revert to 5.1.4, this commit upgrades Clipper to 6.2.1.
  * Documentation
    + Bumped up version for next posting to CRAN in 2015.

2.68  2015-01-22
  * Documentation
    + Fixed some broken hyperlinks and merged `nepacLL.Rd', `nepacLLhigh.Rd', `worldLL.Rd', and `worldLLhigh.Rd' into `nepacLL.Rd' using aliases. (RH 150122)
    + Ignored R CMD check: ``... used in a situation where it does not exist'' -- identified as a temporary bug in R-devel by Duncan Murdoch:
      - http://r.789695.n4.nabble.com/R-CMD-check-quot-quot-used-in-a-situation-where-it-does-not-exist-td4701779.html
    + Resolved missing line feed in `Makefile'; converted format from DOS to UNIX for `Makefile' and `*.cpp' files in `/inst/Utils'. (NB 150114)
  * C code
    + Eliminated warning when compiling `clipper.cpp'. (NB 150112)
      - Commented out an unused variable declared within `clipper.cpp'. This commit turns that declaration into a comment to eliminate the warning.
    + Updated clipper library from 5.1.4 to 5.1.6. (NB 150109)
    + Added `SystemRequirements: C++11' to the DESCRIPTION file to alert user that compilation and linking should be done with a C++11 compiler. (NB 150109)
      - The clipper library used by PBSmapping operates on coordinates stored as integers, and for those integers, it uses the "long long" type that 
      - was introduced in the C++11 standard. When an R package requires C++11 features, the DESCRIPTION file must state this requirement.
  * Documentation
    + Added namespace when calling `deldir' and `read.dbf'. (NB 150109)
      - PBSmapping calls `deldir' (package deldir) and `read.dbf' (package foreign),and for each, the code now specifies the namespace.
    + Bumped up version for next posting to CRAN in 2015.

2.67  2014-12-15
  * C code
    + Changed line in `clipperWrapper.cpp' from `ulong64 val = llabs(*f++);' to `ulong64 val = (ulong64)fabs(*f++);' (NB 141217)
      - The C compiler 'clang' with -Wall reports that PBSmapping is misusing the C function abs in their code: see
      - http://cran.r-project.org/doc/manuals/r-release/R-exts.html#Portable-C-and-C_0022_0022-code
  * Documentation
    + Added NLK and RB as authors because we use their C code `Rshapeget' for the function `importShapefile'. (RH 141217)
  * Computational
    + Added new argument `includeBdry' to functions `findCells' and `findPolys' -- see Issue 33. (RH 141215)
  * Import
    + Incorporated temporary fix for borders in function `importGSHHS' until more robust solution is found. (RH 140623)
  * Documentation
    + JTS requested that RH becomes the package Maintainer. (RH 140327)
    + Bumped up version for next posting to CRAN using builds under R-3.0.3 (RH 140320)

2.66  2014-03-10
  * Computational
    + Fixed bug in `joinPolys` identified by Andrea Romualdi (see Issue 31). (RH 140310)
  * C code
    + Modified gshhs.h to address Issue 30. (JTS 140218)
  * Import
    + Modified the function `importShapefile` to treat shape types (5,15,25) like 5, (3,13,23) like 3, and (1,11,21) like 1. (RH 131220)
      - See `ESRI Shapefile Technical Description: An ESRI White Paper-July 1998` for more details.
  * Documentation
    + Updated `PBSmapping-UG.pdf` to reflect the new website for GSHHS, now called GSHHG. (RH 130503)
    + Added Authors to DESCRIPTION file (based on C source code annotations); updated copyright dates. (RH 130503)
    + Modified User's Guide. (RH 130501)
    + Moved `PBSmapping-Intro.Rnw` to `vignettes` directory. (RH 130501)

2.65  2013-04-22
  * Plotting
    + Added temporary function `.addAxis2` to address Issue 20 until NB updates code. (RH 130422)
  * Documentation
    + Updated the User's Guide. (RH 130411)
    + Modified the `print` method to look for `.PBSmapEnv$PBSprint` in addition to a global `PBSprint`. (RH 130410)
    + Added new temporary working environment called `.PBSmapEnv`. (RH 130410)
  * Examples
    + Modified example code in Rd files to use the new environment `.PBSmapEnv`. (RH 130410)
  * C code
    + Address odd joinPolys output observed in Puget Sound. (NB 130328)
    + Updated Clipper from 5.1.3 to 5.1.4. (NB 130328)
    + Change Clipper line endings from DOS (\r\n) to UNIX (\n). (NB 130323)
    + Replaced the General Polygon Clipper (GPC) library with Clipper. (NB 130323)
    + Fix compilation problem on Windows. (NB 130323)
  * Plotting
    + Support arrows with addLines. (NB 130216)
    + Support multiple bg colours, min.size arg, ... in addBubbles. (NB 130216)
    + Support additional fields in polyProps for addLines. (NB 130210)
  * Documentation
    + Move start-up message to .onAttach (NB 130210)
    + In the process, updated copyright dates. (NB 130210)
    + Updated LICENSE file, based on suggestion from Kurt Hornik. Version advanced slightly. (JTS 121128)

2.64  2012-11-27
  * Documentation
    + Finalised some tweaks to the files DESCRIPTION and LICENSE. (RH 121127)
    + Updated 'PBSmapping-UG.pdf' slightly and set the resolution to 150 dpi. (RH 121126)
    + Bumped up version for yet another submission to CRAN.

2.63  2012-11-19
  * Documentation
    + Submitted to CRAN and rejected by PBR who wants to see AM as a co-author. (JTS 121119)
    + Provided licensing information that protects the General Polygon Clipper (GPC) library. (RH 121116)
    + Wrapped calls to foreign C code in 'eval(parse(text=""))' to bypass the latest R check nonsense. (RH 121102)
    + Changed JTS' email address to schnutej-dfo@shaw.ca [defunct] (RH 121101)
  * Computational
    + Modified function 'placeHoles' to .Call("R_point_in_polygon_sp", ..., PACKAGE="sp"); still need to load package 'sp'. (RH 120405)
    + Added new function 'placeHoles' to fix problem of mismatched holes and solids from ArcView. (RH 120404)
  * Import
    + Modified function 'importShapefile' to optionally use 'placeHoles' for fixing mismatched holes and solids. (RH 120404)
  * Documentation
    + Bumped up the version number to distinguish the revisions under way from the version currently on CRAN. (RH 120404)

2.62  2012-03-01
  * C code
    + Fixed source code problems identified by PBR. (NB 120301)
      - Compiled code should not call functions which might terminate R nor write to stdout/stderr instead of to the console.
      - The detected symbols are linked into the code but might come from libraries and not actually be called.
      - Please fix (especially the call to exit).
    + Resolved partial argument matching in functions identified by PBR. (RH 120301)
  * Documentation
    + Cleaned up various files in preparation for submission to CRAN. (RH 120229)
  * C code
    + Added further conditional compilation to gshhs.[ch] to address warnings in Windows OS. (NB 120228)
  * Import
    + Rewrote GSHHS import functionality and revised some related functions. (NB 120225)
      - This rather large commit completely rewrites GSHHS functionality and provides a number of immediate advantages:
      -   (a) support for the latest (2.20) GSHHS binary files, 
      -   (b) support for multiple levels, e.g., lakes, islands, and ponds, within a single import with suitable ordering of polygons and their holes, 
      -   (c) support for lines, e.g., rivers and borders, 
      -   (d) more robust support functions, e.g., .fixGSHHSworld, and finally, 
      -   (e) a more maintainable approach to GSHHS integration.
      - Some specific changes include:
      - (1) .fixGSHHSworld (PBSmapping.r)
      -     -> support world maps centred on 0 in addition to 180 degrees.
      - (2) importGSHHS (PBSmapping.r)
      -     -> revised arguments to support the new behaviour (above);
      -     -> process argument gshhsDB to support paths relative to home directories;
      -     -> moved handling of minVerts from R to C;
      -     -> moved clipping from C to R (to simplify C code);
      -     -> ordered PIDs/SIDs to support holes.
      - (3) convGSHHS.c
      -     -> rewrote completely so that it is distinct from gshhs.c.
      - (4) gshhs.c
      -     -> added slight revisions to support calls to routines in convGSHHS.c.
      - (5) gshhs.h
      -     -> added slight revisions to support calls to routines in convGSHHS.c.
      - (6) importGSHHS.Rd
      -     -> revised to match the changes to the code.
  * C code
    + Reduced whitespace and break long lines in 'convGSHHS.c'. (NB 120224)
  * Documentation
    + Corrected spelling mistakes in Rd documentation. (NB 120224)
  * Computational
    + Added support for S hemisphere to LL <=> UTM conversion (convUL). (NB 120224)
      - Added support for the southern hemisphere to convUL (and supporting functions) by adding a new 
      - "southern" argument.  By default, the argument is NULL because detection is automatic when the 
      - source is LL. For UTM source data, the default is FALSE because we typically work within the northern hemisphere.
      - Added the ability to compile conversions.c (the supporting C code) as a stand-alone application.  
      - When executed, the stand-alone executable performs a number of conversions that help validate the algorithm.
    + Improved long/lat <=> UTM conversions; updated documentation ( Issue #9 ). (NB 120223)
      - Issue #9  noted erroneous results given data that spanned more than one zone to the right/left 
      - of the intended central zone.  This update improves our implementation by correcting a number of 
      - (implementation) errors (described below), but the problem still persists.
      - The earlier (2001) implementation had a number of optimizations that made it terribly difficult 
      - to verify the code against the published algorithm and inspecting the implementation revealed some errors:
      - (1) the calculation of 'n' used scaled 'a'/'b' rather than original 'a'/'b',
      - (2) the calculation of 'e^2' used scaled 'a'/'b' rather than original 'a'/'b', and
      - (3) the calculation of 'm' was not iterative as suggested in the algorithm.
      - This new version more closely matches the published algorithm and is consequently easy to verify.
      - The performance is similar to the old algorithm (faster in some cases, slower in others).
  * Data sets
    + Re-compressed rda files; changed namespace to explicitly export; changed dependency to R (>= 2.10). (RH 111221)
  * Plotting
    + Fixed missing longitude/latitude X/Y labels on Mac OS X. (NB 111220)
      - When plotting a longitude/latitude PolySet on Mac OS X, the X/Y labels wouldn't plot.
      - Our earlier use of \260 for the degree sign depends on the underlying character set, so it isn't sufficiently portable.
      - Let's hope the current approach works a little better...
    + Updated .addAxis(...) to address layout(...) incompatibility. (NB 111220)
      - .addAxis(...) would backup/restore "omi" and "mfg", which would impact how layout(...) handles multiple plots.
      - This behaviour is unnecessary in the current version of R, so it has been removed.
    + Added refocusWorld() to help plot maps centred on the mid-Atlantic ( issue #4 ). (NB 111219)
      - This new function accepts a PolySet containing one or more polygons with X-coordinates that collectively span 
      - approximately 360 degrees. 
      - The function effectively joins the PolySet into a cylinder and then splits it at an arbitrary longitude according
      - to the user-specified limits.  
      - Modifications in the resulting PolySet are restricted to shifting X-coordinates by +/- multiples of 360 degrees,
      - and instead of clipping polygons, the return value simply omits out-of-range polygons.
    + Fixed indenting. (NB 111219)
  * Documentation
    + Clarified use of "latter" on page 13 of UG (issue #10). (NB 111214)
      - Note: someone will need to regenerate the PDF.  I tried to do so using an open-source PDF creator, 
      - but the resulting file was larger than the one produced by Distiller.
  * Plotting
    + Amended r18, which didn't delete addBubbles.r (NB 111214)
    + Incorporated addBubbles() into PBSmapping.R (NB 111214)
      - Added addBubbles() to PBSmapping.R and made many changes including completely reformatting all of the code,
      - improving the comments, changing some of the logic, and addressing bugs.
      - The bugs included (a) testing floating-point equality using ==, which would result in inconsistent behaviour and 
      - (b) sizing bubbles in a way that that was inconsistent with the documentation.
  * C code
    + Changed EOL character from \r\n to \n for polygons.c (NB 111214)
      - When running R CMD CHECK, the script complained about the end-of-line character for this particular file.
      - I've changed the character to eliminate the warning.
  * Documentation
    + namespace requires the use of '.onLoad' instead of '.First.lib'. (RH 111109)
    + R-2.14.0 now requires all packages to have a namespace.  (RH 111109)
    + Added the UG document (PBSmapping-UG.doc) to a 'documentation' folder under 'trunk' in the SVN repository. (RH 111003)
    + Changed status of Issue 11 to 'Started'  - incorporate PBSmapping protocols into function 'addBubbles'. (NB 111002)
    + Changed status of Issue 9  to 'Accepted' - user is possibly talking about 'MGRJ' latitude bands. (NB 111002)
    + Changed status of Issue 10 to 'Accepted' - word change needed in UG. (NB 111002)
    + Changed status of Issue 8  to 'Invalid'  - UG appears to be unlocked now. (NB 111002)
    + Changed status of Issue 1  to 'Invalid'  - segmentation fault not reproducible and user never supplied code. (NB 111002)
    + Improved path expansion in 'importShapefile' using R's 'path.expand' and ' normalizePath'. (NB 111002)
    + Bumped up the version number to distinguish the revisions under way from the version currently on CRAN. (RH 110908)
  * Computational
    + Fixed a bug in appendPolys() and update the function's documentation. (NB 110905)
      - Within appendPolys(), a reference to polys used parentheses rather than brackets causing R 
      - to look for a non-existent polys function rather than the argument.
      - The documentation for the function was also updated to clarify the determination of the polygon's PID.

2.61  2010-06-23  [RH]
  * Import
    + Revised 'importShapefile' to fix a small bug associated with reading a shapefile's projection. (RH 100601)

2.60.8  2010-06-22  [JTS]
  * C code
    + Fixed bug related to clipping, found by DC
    + NB found that "polygons.c" should have *inVerts > 0 in sutherlandHodgmanPolygonClip
    + Replaced "polygons.c" with the corrected version 

2.60  2010-04-27  [JTS]
  * Documentation
    + New version number, consistent with package building scheme
  * C code
    + Added "#include <errno.h>" to "convGSHHS.c", based on a message from PBR

2.59.02  2010-01-07  [RH]
  * Plotting
    + Added new function 'addBubbles' created by DC.

2.59.01  2009-07-30  [RH]
  * Computational
    + Modified 'makeTopography()' to handle large output matrices better.
      - Introduced a precision argument to increase the speed of calculations for debugging and draft quality.

2.59  2008-10-07  [RH]
  * Documentation
    + Standardised 'ChangeLog.txt' of PBS packages for viewing in HTML.
      - Header lines comprise:  version  date  builder
    + Standardised references section in '*.Rd' files.
    + POSTED ON CRAN.

2.58  2008-08-25  [RH]
  * Plotting
    + Modified function '.addLabels()' to NOT allow values in '...' to flow through to 'title()'.
      - Conflicts with formal arguments like 'xlab'.

2.57  2008-07-24  [RH]
  * Plotting
    + Modified function '.addLabels()' to allow values in '...' to flow through to 'title()'.
  * Documentation
    + POSTED ON CRAN.

2.561  2008-07-23  [JTS]
  * Documentation
    + Modified the vignette and changed the file name to 'PBSmappingIntro'.

2.56  2008-07-16  [RH]
  * Import
    + Revised 'importShapefile()' and fixed bug when 0-vertex polygons occur.
  * Documentation
    + Added '00ReadMe' vignette.
    + Moved User's Guide and 'ChangeLog.txt' to '../inst/doc'.
  * Plotting
    + Removed 'gamma' from 'legalNames' in '.plotMaps'.

2.55  2008-01-22  [RH]
  * Computational
    + Revised 'calcConvexHull()' in PBSmapping.r to use 'chull()' in package grDevices
    + Removed 'calcConvexHull' from PBSmapping.c
  * C code
    + Removed 'convUL', 'sortPointList', and 'rightTurn' from polygons.c (and polygons.h).
  * Examples
    + Substituted 'findCells()' for 'findPolys()' in '.PBSfig09()'.
  * Documentation
    + Built with R-2.6.1.
    + POSTED ON CRAN.

2.54  2007-10-03  [RH]
  * Documentation
    + Updated User's Guide
    + Built with R-2.6.0.
    + POSTED ON CRAN.

2.53  2007-10-01  [NB]
  * C code
    + src/convGSHHS.c: Modified 'importGSHHS (...)' to remove the local variable 's' 
      - involved in the call to 'extracGSHHS (...)' in hopes of eliminating a compiler warning.
    + Modified the 'inFileName' argument of  'extracGSHHS (...)' so that the argument is 
      - now 'const char *' to eliminate a warning message from the C compiler.
  * Computational
    + R/PBSmapping.R: Modified 'combineEvents (...)' to remove code that supported S-PLUS.
      - The code caused a warning message in the R build because R doesn't support the 'unpaste' function.
  * Import
    + Modified 'importPolys (...)', 'importEvents (...)', and 'importLocs (...)' 
      - to change 'T' to 'TRUE' and '=' to '<-'.
  * Examples
    + R/PBSfigs.R: Modified '.initPBS (...)', '.PBSfig05 (...)', and
      - '.PBSfig10 (...)' to replace 'T'/'F' with 'TRUE'/'FALSE'.
    + Modified '.initPBS (...)' to replace vectorized (|) with non-vectorized (||) operator.

2.521  2007-09-30  [NB]
  * C code
    + src/PBSmapping.c: Modified 'void pnpoly (...)' to address a warning message
      - about 'limits' being used without initialization.
    + src/convGSHHS.c: Modified 'convGSHHS (...)' to address a warning
      - message about C++ style comments and correct a spelling mistake.
    + Modified in various other places to change C++ style comments to C style.

2.52  2007-08-28  [RH]
  * Computational
    + Revised 'makeTopography()' to allow combinations z[x,y] to be NA or duplicated.
      - If the latter, values of Z for z[x,y] are summarised using the new argument 'func'.

2.51  2007-07-11  [RH]
  * Examples
    + Revised example code in .\man\makeTopography.Rd (changed "extra" to "Extra" for UNIX compatibility).
    + Changed name of "VERSION.TXT" to "GPChistory.txt" and moved from .\src\ to .\R\inst\Extra.
  * Documentation
    + POSTED ON CRAN.

2.50  2007-06-29  [RH]
  * Documentation
    + Revised the User's Guide & Rd files. Bumped up version for release.

2.17  2007-06-06  [RH]
  * Examples
    + Changed code for '.PBSfig08()' in .\R\PBSfigs.r to account for new PIDs in revised nepacLLhigh.
    + Removed references to S-PLUS from .\R\PBSfigs.r
  * Documentation
    + Revised the UG.

2.16  2007-06-06  [RH]
  * Documentation
    + Revised the User's Guide.
    + Revised Rd files.
  * Examples
    + Checked and revised 'aleutian' bathymetry example for Appendix B.
  * Computational
    + Removed the function 'outputGSHHS()' from .\R\PBSmapping.r

2.15  2007-06-04  [RH]
  * Computational
    + Recoded '.fixGSHHSWorld()'
  * Import
    + Added R code to 'importGSHHS()' to activate argument n (in C, SEXP minVerts is not used).
  * Data sets
    + Rebuilt data objects: 'nepacLL', 'nepacLLhigh', 'worldLL', 'worldLLhigh' using DB gshhs_1.5.zip
  * Examples
    + Extracted and removed figure functions from .\R\PBSmapping.r and placed them into file: .\R\PBSfigs.r 
  * Documentation
    + Updated the user guide PBSmapping-UG.pdf
    + Removed directory .../inst/GSHHS.
    + Changed the name of 'checkClipLimits()' to '.checkClipLimits()'.
    + Changed names ('polySet', 'polyData', 'eventData', 'locationSet') to
      - ('PolySet', 'PolyData', 'EventData', 'LocationSet') in .\R\PBSmapping.r.

2.14  2007-05-29  ACB
  * C code
    + Updated GSHHS C code to read new database format:
      - url: gshhs_1.8_src.zip DB: gshhs_1.5.zip from ftp://ftp.soest.hawaii.edu/pwessel/gshhs

2.13  2007-02-14  ACB
  * C code
    + R/PBSmapping.r: Added 'outputGSHHS()', 'importPolys()', 'importEvents()', 'importLocs()'.
    + src/convGSHHS.c: handles .Call interface
  * Documentation
    + man/importGSHHS.Rd: Created documentation
    + man/outputGSHHS.Rd: Created documentation

2.12  2007-02-08  ACB
  * Import
    + R/PBSmapping.r: Added 'importGSHHS()'.
  * C code
    + src/convGSHHS.c: Created underlying C code for 'importGSHHS'.
  * Documentation
    + man/importGSHHS.Rd: Created documentation

2.11  2007-01-23  [RH]
  * Documentation
    + Added two directories under '.../inst':
      - GSHHS
      -  Steps to convert GSHHS to PBSmapping format.
      -  Wessel's C-code for converting binary to ASCII.
      -  Boers' code to convert ASCII to PBSmapping.
      -  Boers' code (& Couture-Beil) to clip polygons
      - Utils
      -  C-code by Boers and Couture-Beil for 'clipPolys()', 'convUL()', and 'findPolys()'.
    + Changed 'convUL.Rd' to specify that UTM coordinates are in kilometres.
  * Data sets
    + Re-saved the data files using 'save("data",file="data.rda")'.Compresses binary files more than earlier saves.

2.102  2007-01-03  [JTS]
  * Computational
    + Built for R only, with first attempts to remove traces of S-PLUS.

2.101  2006-11-14  [NB]
  * Import
    + R/PBSmapping.R 'importShapefile()': Eliminated a bug that caused some 
      - "reef" shapefiles not to load.  It occurred when no POS entries needed reversing.

2.10  2006-10-02  [NB]
  * Documentation
    + R/PBSmapping.R: Added argument 'PACKAGE = "PBSmapping"' to all .C() calls.
    + man/contourLines.Rd: Removed (only necessary for S-PLUS).
  * C code
    + src/gpc.c: Removed "../common/" from #include's.
    + src/PBSmapping.c: Removed "../common/", "../gpc/", and "../mcd" from #include's.

2.09  2006-09-04  [NB]
  * Computational
    + RS_Source/PBSmapping '.expandEdges()': Added function to address an issue in 'calcVoronoi()'.
      - when points appeared outside of the polygons.
    + 'calcVoronoi()': Updated to use the new function '.expandEdges()' and create a PolySet with the proper extents.
  * Documentation
    + RS_Docs/calcArea.Rd: Fixed typo.
    + RS_Docs/dividePolys.Rd: Fixed typo.
    + RS_Docs/calcSummary.Rd: Fixed typo.
    + RS_Docs/importShapefile.Rd: Fixed typo.
    + RS_Docs/pythagoras.Rd: Fixed typo.
    + RS_Docs/calcVoronoi.Rd: Fixed typo.
    + RS_Docs/importShapefile.Rd: Updated to reflect new argument in function.
    + RS_Source/PBSmapping importShapefile(): Added arguments "projection" and "zone".
    + RS_Docs/calcVoronoi.Rd: Updated to reflect the new behaviour where it returns a PolySet matching the limits.
    + POSTED ON CRAN.

2.087  2006-08-25  [NB]
  * Documentation
    + RS_Docs/calcVoronoi.Rd: Added comments about setting the "projection" and "zone" attributes.
  * Computational
    + RS_Source/PBSmapping 'calcVoronoi()': No longer uses the attributes "projection" and "zone"
      - from the input data set.  Instead, sets "projection" to 1 and "zone" to NULL; these
      - values are more appropriate for the result.

2.086  2006-08-15  [NB]
  * Computational
    + RS_Source/PBSmapping '.addCorners()': Cleaned up the code. 
    + 'calcVoronoi()': Cleaned up the code.

2.085  2006-08-10  [NB]
  * C code
    + C/common/polygons.c 'convexHull()': Fixed a (trivial) bug in 'calcConvexHull()'
      - that caused it to produce incorrect (bizarre) results.
  * Computational
    + RS_Source/PBSmapping '.addCorners()': Added function.

2.084  2006-08-04  [NB]
  * Documentation
    + RS_Docs/calcVoronoi.Rd: Updated to reflect the removed "close" argument.
  * Computational
    + RS_Source/PBSmapping 'calcVoronoi()': Removed 'close' argument.

2.083  2006-07-20  [NB]
  * Documentation
    + RS_Docs/dividePolys.Rd: Minor updates.
    + RS_Docs/combinePolys.Rd: Minor updates.
  * Plotting
    + RS_Source/PBSmapping 'addPolys()': Identified and corrected two bugs that caused errors 
      - in S-PLUS re: the "colHoles" argument.  One bug involved a difference between R/S-PLUS
      - polygon commands, where the S-PLUS version fails when given less than 3 points.
      - The other involved the code 'pProps$colHoles[is.na(pProps$colHoles)] <- "transparent"';
      - which would convert the 'colHoles' element to a character vector even if it made no replacements.
    + '.insertNAs()': Created function with a similar _purpose_ as the old 'insertNAs()' function 
      - in 'addLines()' and 'addPolys()'.  This function replaces it, operates drastically different, and 
      - is faster (in one test in R, ~11 seconds for 'plotMap(nepacLLhigh)' compared to ~77 seconds previously).

2.082  2006-07-19  [NB]
  * Documentation
    + RS_Docs/calcVoronoi.Rd: Created a better example based on [RH]'s code/suggestion.
  * Computational
    + RS_Source/PBSmapping 'calcVoronoi()': Corrected bug where the function would fail 
      - when a polygon contained more than two points on a boundary.

2.081  2006-07-18  [NB]
  * Computational
    + RS_Source/PBSmapping '.checkProjection()': Updated error message since it can compare 
      - the projection of non-PolySet with that of a plot region.
  * Plotting
    + 'addLabels()': Identified and fixed bug where EventData containing a PID/SID column 
      - would incorrectly be recognized as PolyData.
  * Object-related
    + Removed message when 'fullValidation' == T : (is.EventData, is.LocationSet, is.PolyData, is.PolySet)
    + Added a check for "data frames" to better support conversions between PBS Mapping data types:
      - ('as.EventData()', 'as.LocationSet()', 'as.PolyData()', 'as.PolySet()').
  * Documentation
    + RS_Docs/importShapefile.Rd: Cleaned up documentation and expanded it for clarity.

2.08  2006-07-17  [NB]
  * Documentation
    + R_Other/DESCRIPTION (Suggests): Removed suggests for 'sp' since not (yet) suggested.
    + RS_Source/PBSmapping '.pbsproj()': Commented out to make release 2.08.

2.073  2006-07-16  [NB]
  * Documentation
    + RS_Docs/importShapefile.Rd: Updated to reflect additional argument and ability to import DBFs.
  * Import
    + RS_Source/PBSmapping (importShapefileDBF): Removed function.
    + 'importShapefile()': Updated function to import DBFs.

2.072  2006-07-13  [NB]
  * Documentation
    + RS_Docs/calcVoronoi.Rd: Added "close" argument to match code.
  * Computational
    + RS_Source/PBSmapping 'calcVoronoi()': Added warning for data of an "LL" projection.
    + RS_Source/PBSmapping 'calcVoronoi()': Added argument "close = TRUE".
      - When TRUE, calls "closePolys" to close the polygons (i.e., corners).

2.071  2006-07-10  [NB]
  * Documentation
    + RS_Docs/combinePolys.Rd: Created documentation for new function.
  * Computational
    + RS_Source/PBSmapping 'dividePolys()': Created new function.
    + RS_Source/PBSmapping 'calcVoronoi()': Added code to add attributes to the result as well as close the polygons.
    + 'combinePolys()': Created new function.

2.07  2006-07-07  [NB]
  * Computational
    + RS_Source/PBSmapping 'SpatialPolygons2PolySet()': Commented out to make release 2.07.
    + 'SpatialLines2PolySet()': Commented out to make release 2.07.
    + 'SpatialPoints2EventData()': Commented out to make release 2.07.
    + RS_Source/PBSmapping '.checkRDeps()': Made hidden by renaming from 'checkRDeps()'; 
      - updated other functions to reflect the change.
  * Documentation
    + RS_Docs/importShapefileDBF.Rd: Created.
    + RS_Docs/importShapefile.Rd: Created.
    + RS_Docs/calcConvexHull.Rd: Updated description of "xydata" to improve clarity.
    + RS_Docs/calcVoronoi.Rd: Created.
  * Import
    + 'importShapefile()': Rewrote so that it depends only on the C code included with  "maptools" and nothing else.
      - It's now much faster as it no longer converts to Spatial classes first. It still supports holes for PolySets.
    + 'importShapefileDBF()': Updated/simplified since DBF files contain one record per PID/EID.
      - No longer reads in the shapefile to create the indices.

2.066  2006-07-06  [NB]
  * Computational
    + RS_Source/PBSmapping 'calcVoronoi()': Updated to create a consistent interface with other PBS Mapping functions.
    + 'calcVoronoi()': Resolved issue re: ordering of points.

2.065  2006-07-05  [NB]
  * Computational
    + RS_Source/PBSmapping 'calcVoronoi()': Added preliminary version of new "calcVoronoi" function.
    + 'locatePolys()': If a variable named "SID" existed before the call, it would break the function. Fixed.
  * Plotting
    + RS_Source/PBSmapping (addPolys): Finished adding a first version of the "colHoles" argument.
  * Documentation
    + RS_Docs/addPolys.Rd: Added "colHoles" argument.
    + RS_Docs/plotPolys.Rd: Added "colHoles" argument.
    + RS_Docs/plotMap.Rd: Added "colHoles" argument.

2.064  2006-07-04  [NB]
  * Computational
    + RS_Source/PBSmapping 'findCells()': Removed final call to 'as.LocationSet()' to 
      - improve performance and added code to manually set the class.
    + '.preparePolyProps()': Simplified the code.
  * Plotting
    + 'plotMap()': Added "colHoles" argument for hole colours and included it in the call to '.plotMaps()'.
    + 'plotPolys()': Added "colHoles" argument and added it in the call to '.plotMaps()'.
    + '.plotMaps()': Added "colHoles" argument and included it in the call to 'addPolys()'.
    + 'addPolys()': Added "colHoles" argument.

2.063  2006-06-21  [NB]
  * Documentation
    + R_Other/DESCRIPTION (Suggests): Added suggests for "foreign",
      - "sp", and "maptools" to use the new import functionality.

2.062  2006-06-19  [NB]
  * Computational
    + RS_Source/PBSmapping '.pbsproj()': Created function.
    + 'SpatialPolygons2PolySet()': Created function.
    + 'SpatialLines2PolySet()': Created function.
    + 'SpatialPoints2PolySet()': Created function.
  * Import
    + 'importShapefile()': Created function.
    + 'importShapefileDBF()': Created function.
    + '.getBasename()': Created function.

2.061  2006-05-24  [NB]
  * C code
    + C/Makefile: Added code that attempts to detect R < 2.3.0  to account for 
      - the new DLL build procedure. No longer defines the CYG_DIR and R_DIR variables;
      - instead, it expects them to be set in an environment variable.
    + Added new targets (depR and depCygwin) to check whether the appropriate environment variables are defined.

2.06  2006-05-17  [NB]
  * Computational
    + RS_Source/PBSmapping '.getGridPars()': Replaced the call to 'identical()' with
      - '!is.character(all.equal())' because S-PLUS 2000 lacks an 'identical' function.
  * Documentation
    + SPLUS6.sh: Added the path to the S-PLUS 6.2 CHAPTER command.
    + POSTED ON CRAN.

2.05  2006-05-10  [NB]
  * Computational
    + RS_Source/PBSmapping 'findPolys()': Renamed the argument 'avg' to 'maxRows' so that 
      - the user can now enter the estimated number of  rows in the output. 
      - Behavior is consistent with 'joinPolys()', which has a 'maxVerts' argument.
    + 'findPolys()': Updated the error messages to match the 'maxRows' argument.
    + 'joinPolys()': Updated the error messages to match the 'maxVerts' argument.
    + 'joinPolys()': Removed dead code where it formerly calculated 'outCapacity'.
  * Documentation
    + RS_Docs/makeGrid.Rd: Clarified the meaning of 'i' and 'j' in the details section.
      - Corrected an off-by-one error with 'm' and 'n' in the details section.
    + RS_Docs/findPolys.Rd: Updated to reflect renaming the 'avg' argument to 'maxRows'.
    + POSTED ON CRAN.

2.04  2004-11-14  [NB]
  * C code
    + Replaced all instances of long with PBSINT to quickly support R's use of 'int' rather than 'long'.
      - Will make similar replacements in the dependent files.
    + Checked GPC functions to ensure appropriate types were being passed into the GPC,
      - because I won't make similar replacements within that module
  * Documentation
    + POSTED ON CRAN.

2.03  2005-06-01  [NB]
  * Documentation
    + POSTED ON CRAN.

2.02  2004-11-18  [NB]
  * Documentation
    + POSTED ON CRAN.

2.01  2004-09-22  [NB]
  * Documentation
    + POSTED ON CRAN.

## VERSION 2.00 ## 23 Aug 2004 ############################################
2.00  2004-08-23  [NB]
  * Documentation
    + de nada

1.995  2004-08-19  [NB]
  * Computational
    + Renamed calcMeanRange() to calcMidRange()
    + Changed Earth radius to 6371.3 km

1.994  2004-08-16  [NB]
  * C code
    + Moved 'isPolyConvex()' to polygons.c
    + Moved 'nPolyIntersects()' to polygons.c
    + Moved 'isRetrace()' to polygons.c
    + Moved 'linesIntersect()' to polygons.c

1.993  2004-08-11  [NB]
  * Computational
    + Rewrote .initPlotRegion so that it only sets directly pin/plt when necessary;
      - it sets them via mai/mar whenever possible;
      - this fixed a bug where mai was being ignored after the initial plot

1.992  2004-08-04  [NB]
  * Computational
    + Added .validatePolyProps() to detect factors in PolyProps object
    + Added call to .validatePolyProps() in .addFeature, addLines, addPolys

1.991  2004-08-03  [NB]
  * Object-related
    + Added note to 'isPolyConvex()'
  * Documentation
    + POSTED ON CRAN.
  * Computational
    + Slight modifications to `makeProps'; nothing serious

## VERSION 1.99 ## 30 July 2004 ###########################################
  * Computational
    + Fixed bug in isConvex() where `convex' column would contain factors in S-PLUS
    + Fixed bug in addLabels() where it would look at data's projection for PolyData even if placement != "DATA"

1.989  2004-07-29  [NB]
  * Computational
    + Updated 'joinPolys()' to use existing PIDs when either 'polysA' or 'polysB' contains only one "generic" polygon
    + In calcLength, rollup = 2 now issues a warning and resets that  argument to 3.

1.98  2004-07-28  [NB]
  * Computational
    + Rewrote 'joinPolys()' and added several functions ('gpcOutputPoly()', 'gpcCreatePoly()')
      - to support it; the code is much cleaner (and more powerful now).

1.941  2004-07-26  [NB]
  * Computational
    + print.* now call appropriate summary.* function, rather than the  generic `summary' function
      - no functional difference, but now my scripts for building the tech. report find this dependency

## VERSION 1.94 ## 25 July 2004 ###########################################

1.932  2004-07-23  [NB]
  * Computational
    + Fixed bug where addPolys() not recognizing `lwd' -- `...' wasn't being passed into the `polygon' command

1.931  2004-07-22  [NB]
  * Computational
    + Added `makeTopography' to convert imported topography data into a format accepted by the `contour' function

## VERSION 1.93 ## 21 July 2004 ###########################################
1.93  2004-07-21  [NB]
  * Documentation
    + de nada

1.921  2004-07-19  [NB]
  * Computational
    + All summary functions now report extra columns
    + Aadded argument `noFactorCols' to .validateData()
    + Fixed bug in .validateData where a single column wouldn't be tested for numeric entries
    + Improved .validateData() by adding checks for an increasing/decreasing POS column

## VERSION 1.92 ## 18 July 2004 ###########################################
1.92  2004-07-18  [NB]
  * Documentation
    + de nada
  * Computational
    + Incorporated .createIDs into several more functions
    + Cleaned up a bunch of code

1.914  2004-07-16  [NB]
  * Computational
    + Corrected return type of .appendPolys() (it's PolySet rather than PolyData)

1.913  2004-07-15  [NB]
  * Computational
    + Added new variable, `PBSprint' to indicate whether to print our class objects as summaries or as data frames
    + Updated .validateData() to use new .createIDs function
    + Finished all the new functions (.createIDs, etc.), including some comments
    + Rearranged addLines() and addPolys() to take better advantage of new .createIDs, etc. functions

1.912  2004-07-14  [NB]
  * Computational
    + Added summary.EventData(), summary.LocationSet(), ... to obtain summaries, and made print.* point to those functions
    + Fixed bug in 1.91 where addLines() wasn't creating proper PolyProps objects

1.911  2004-07-13  [NB]
  * Computational
    + Sped up `.validateData' by building more expressions at run-time to prevent using []'s to grab multiple columns from data frames
    + Bug in .addFeature() -- looking for `polys' when it should have been looking for `data'
    + Improved handling of C function results (improved efficiency)
    + Found serious bug in calcCentroids(); fixed (both at the C level and in the R/S code); incorrect centroids for holes
    + Changed the interface to `.validate*', now they return a string when they fail, rather than stopping
    + Made it so that when a .validate*() fails, it stops() in the caller rather than the validation function; improved error messages
    + Added `.createFastIDdig()', `.createIDs', and `.preparePolyProps' to reduce redundancy in code (addLines()/addPolys())
    + Sped up `addLines()' and `addPolys()' with "fast ID" creation
    + Added as.EventData(), as.LocationSet(), as.PolyData(), and as.PolySet() to support `class' attribute
    + Added is.EventData(), is.LocationSet(), is.PolyData(), and is.PolySet() to support `class' attribute
    + Added .validateLocationSet()
    + Added print.EventData(), print.LocationSet(), print.PolyData(), and print.PolySet() to support `class' attribute
    + User-accessible functions now set their output to the appropriate class

 ## VERSION 1.91 ## 12 July 2004 ###########################################
1.91  2004-07-12  [NB]
  * Documentation
    + de nada

1.9093  2004-07-10  [NB]
  * Computational
    + Removed global setting of `mgp'

1.9092  2004-07-08  [NB]
  * Computational
    + extensive changes to code, including:
      - fixed bug where default properties could replace existing  properties in `polyProps'
      - renamed `bgCol' argument to `bg' (increase R consistency)
      - removed `xlab', `ylab', etc. arguments from `plot*()'
      - added support for `type = "n"', and changed colouring behaviour when plotting a NULL PolySet
      - added `projection' argument to all `plot*()' functions: supports T/F/#/"LL"/"UTM"
      - added warnings for when par() paremters are ignored
      - with reworking, now `plot*()' accounts for `sub' argument
      - simplified the backup/restore of par() arguments across multiple functions, because .plotMaps() and add*() now does this

1.9091  2004-07-06  [NB]
  * Computational
    + Added support for `mai' in plotLines, plotMap, plotPolys

1.909  2004-07-05  [NB]
  * Computational
    + Renamed 'convexHull()' to 'calcConvexHull()';
      - it called 'calcConvexHull()', and renamed this call to 'convexHull()'.
    + In calcConvexHull(), renamed C function to `calcConvexHull'

1.908  2004-07-02  [NB]
  * Computational
    + Replaced some apply(..., paste, ...)'s with a single paste() expression by building the expression at run-time

1.907  2004-06-30  [NB]
  * Computational
    + Added 'isConvex()'
    + Added 'nPolyIntersects()'
    + Decided to move `contourLines()' back to its own file

1.906  2004-06-29  [NB]
  * Computational
    + Added 'isRetrace()' to support 'isIntersecting()'.
    + Added 'lineIntersect()' to support 'isIntersecting()'.
    + Fixed return statement in addPolys()
    + Added [RH]'s `contourLines()' function, used only for S-PLUS
    + Added isIntersecting()

1.905  2004-06-28  [NB]
  * Computational
    + Added 'isIntersecting()' to determine if a polygon is self-intersecting.

1.904  2004-06-27  [NB]
  * R code
    + Fixed bug in .plotMaps when plotting NULL PolySet (ret not found)
    + added convCP() function to convert contourLines() output into a PolySet

1.903  2004-06-25  [NB]
  * R code
    + Renamed makePolysFromL() to convLP()
    + Renamed makePolysFromD() to convDP()
    + Ensured addLines(), addPolys(), plotLines(), plotMap(), plotPolys() all returned values matching documentation
    + Rremoved workarounds for bugs in R versions < 1.9.0

1.902  2004-06-24  [NB]
  * R code
    + Added `polyProps' to addLabels()
    + Added `polyProps' to addPoints()
    + Created .addProps(), which replaced .createPolyProps()
    + Updated addLines and addPolys so that they call .addProps()

1.901  2004-06-23  [NB]
  * R code
    + Changed interface to calcSummary()
    + Changed interface to combineEvents()
    + Renamed arguments for makePolysFromL()
    + Added `filter' argument to thickenPolys()
    + Renamed `tolerance' to `tol' for both thickenPolys() and thinPolys()

## VERSION 1.90 ## 22 June 2004 ###########################################
1.90  2004-06-22  [NB]
  * Documentation
    + de nada
  * R code
    + Added `rollup' and `close' arguments to calcLength()
    + Renamed makePolyFromLines() to makePolysFromL()
    + Renamed makePolysFromData() to makePolysFromD()

1.80  2004-06-21  [NB]
  * Computational
    + Changed 'calcArea()' to match new interface for 'calcPolyArea()'; 
      - can now return negative areas for holes; substantially simplified function.
    + Modified calcArea() to handle the roll-up argument (removed `sumPID' argument
    + Changed the area column of calcArea() to "area" rather than "Area"
    + Removed default of `mean' from combineEvent()'s FUN argument
    + Added automatic zone calculation for convUL() when proj == "LL"

1.70  2004-06-18  [NB]
  * Computational
    + Removed 'fixPOS()' and 'integrateHoles()'.
    + Any functions that relied on the fixPOS() or integrateHoles() C code now use a new function, .rollupPolys()
    + Removed .mergePolys(); replaced by .rollupPolys()
    + Removed .integrateHoles(); replaced by .rollupPolys()
    + Given calcSummary(), calcMean() is redundant -- removing it
    + Finished calcMeanRange()

1.60  2004-06-17  [NB]
  * Documentation
    + Cleaning
  * Computational
    + Added 'rollupPolys()' to replace 'fixPOS()' and 'integrateHoles()' - but it does much more than those two.
    + Created empty calcSummary(), calcMean(), and calcMeanRange() functions
    + Created rollupPolys(), which will assist me in writing the above functions

1.50  2004-06-16  [NB]
  * C code
    + Adjusted paths to #include's
  * R code
    + Renamed addStippling() to addStipples()
      - looked in a better dictionary (http://www.webster.com/), and `stipples' appears to be correct as well
    + Renamed calcArea()'s `sumPID' argument to `onlyPID'

1.40  2004-06-15  [NB]
  * Computational
    + Renamed 'integrateHoles()' to 'mergePolys()';
      - now merges in all SIDs when specified as well as those representing holes.
  * C code
    + Fixed huge memory leak and bug in 'joinPolys()' -- the clip polygon wasn't handled correctly.
  * R code
    + Finished appendPolys() function
    + S-PLUS doesn't have an atan2() function (used in .calcDist()), so modified to work around it
    + Renamed .integreateHoles() to .mergePolys() as it now merges in  all SIDs (with retrace lines) as well as merge holes
    + locateEvents() and locatePolys() now set their result's attribute  based on the projection of the current plot
    + Cleaned up locateEvents(); fully tested in R/S-PLUS
    + Added new `outStatus' value for joinPolys() -- "invalid `singlePoly'"

## VERSION 1.30 ## 14 June 2004 ###########################################
1.30  2004-06-14  [NB]
  * Documentation
    + de nada
  * Computational
    + Corrected bug in .createPolyProps() where warnings could be disabled and then never reenabled
      - plus, this disabling was being done in the  middle of a loop?  Stupid!
    + Create .calcDist() from code in calcLength()
    + Changed the distance formula in calcLength() to the Haversine
    + Added "intelligent" calculation of `outCapacity' for thickenPolys()  to fix a bug
    + Fixed bug in calcArea() -- it was calling wrong C function
    + Started appendPolys() function

1.26  2004-06-10  [NB]
  * Computational
    + Gave 'fixPOS()' the ability to update X/Y values so that it can make polygons that follow
      - the GIS standards for clockwise/counter-clockwise.
    + Renamed 'calcPolygonArea()' to 'calcPolyArea()'
    + Updated calcCentroid() to properly handle holes
      - involved adding an "integrateHoles" argument and moving the code to C

1.25  2004-06-09  [NB]
  * C code
    + Performed preliminary memory tests on all functions, and none appeared to have memory leaks.
    + Added `.calcOrientation()' to determine whether vertices are clockwise or counter-clockwise.
      - will be used by other functions for exporting to GIS software (to prepare holes for other interfaces)

1.24  2004-06-08  [NB]
  * Computational
    + Added 'thickenPolys()' (only supports UTM).

1.23  2004-06-07  [NB]
  * R code
    + Added makePolyFromLines() and makePolysFromData() functions
      - for consistency, the base of the names should be makePoly* -- added the  suffix for clarity
    + Added addLabels() function

1.22  2004-06-03  [NB]
  * R code
    + Updated calcArea() to handle UTM (via a conversion to LL)

1.21  2004-06-02  [NB]
  * Computational
    + Updated 'thinPolys()' to support UTM.
    + Fixed bug in calcLength() where floating-point imprecision would cause calculations outside the domain of acos()

## VERSION 1.20 ## 30 May 2004 ############################################
1.20  2004-05-30  [NB]
  * Documentation
    + de nada

1.15  2004-05-26  [NB]
  * C code
    + Fixed huge memory leaks in 'joinPolys()'.
    + Added support for all R-accessible functions to interface with MemCheckDeluxe.
  * R code
    + Modified all stop()/warning() messages so they don't begin with a newline
    + Added calcLength() function
    + Modifed calcArea() so it produces a warning when given a LL data set

1.14  2004-05-24  [NB]
  * C code
    + Fixed huge bug in 'joinPolys()', where an error would be signalled where one didn't really exist
      - (check if all holes were processed was placed in the wrong spot...).

1.13  2004-05-23  [NB]
  * R code
    + Finished addPoints()

1.12  2004-05-21  [NB]
  * R code
    + Cleaned up calcConvexHull()
    + Added support for plotting NULL PolySets (i.e., if the whole PolySet is clipped
    + Added "projection" attribute to plotMap(), to allow for plotting  NULL PolySets
    + Added bgCol argument to plotLines -- I don't know why it wasn't already there
    + Increased the robustness of extractPolyData() -- much better now!

1.11  2004-05-20  [NB]
  * Computational
    + Added 'convexHull()'

## VERSION 1.10 ## 16 May 2004 ############################################
1.10  2004-05-16  [NB]
  * Documentation
    + de nada
  * R code
    + Added check on thinPolys() to ensure projection = "LL"
    + Renamed centroid() to calcCentroid()
    + Fixed bug in addLines() and addPolys() where xlim/ylim were ignored

1.09  2004-05-12  [NB]
  * Computational
    + Renamed 'clipToPoly()' to 'joinPolys()'.
    + Extensively cleaned up 'joinPolys()' code.
  * C code
    + Added 'extern gpc_success' to catch errors that occur within GPC.
    + Discovered setjmp.h (setjmp() and longjmp())!!!
      - Now I can reliably detect memory allocation errors that occur in GPC!!!
    + Added support for more-robust communication between R/S-PLUS and C

1.08  2004-05-11  [NB]
  * Computational
    + Renamed 'clipPoly()' to 'clipToPoly()'.

1.07  2004-05-10  [NB]
  * C code
    + Continued use of the Greiner/Hormann polygon clip routine would require accounting for numerous special cases;
      - switching to the gpc (General Polygon Clipper) library.
    + Fully implemented an interface to the gpc library (holes and all).
  * Documentation
    + We will need to rename the R function from 'clipPoly' to something more intuitive.
  * R code
    + Changed clipPoly() so it doesn't indiscriminately drop the SID column

1.06  2004-05-09  [NB]
  * R code
    + Added clipPoly() function to clip one polygon against another polygon

1.05  2004-05-07  [NB]
  * R code
    + Added centroid() function; returns PolyData

1.04  2004-05-05  [NB]
  * R code
    + plot*() now recognizes xaxt/yaxt = "n"
    + Added extractPolyData()
    + Added support to clipping to maintain "extra" data fields

1.03  2004-05-04  [NB]
  * Computational
    + Added 'thinPolys()' function.
    + Updated .addAxis() to fix the bug where the border/axis/etc. would shift when drawing multiple figures (i.e., mfrow)
    + Added thinPolys()

1.02  2004-05-03  [NB]
  * R code
    + Updated addPolys() to eliminate retrace lines when S-PLUS plots polygons with holes

1.01  2004-01-04  [NB]
  * Computational
    + Cosmetic changes to the code.

## VERSION 1.00 ## 01 Jan 2004 ############################################
1.00  2004-01-01  [NB]
  * R code
    + Corrected handling of text in the margins
    + Fixed bug in .createPolyProps(); removal of factors was failing because of NAs
    + Corrected insertNAs() to prevent S-PLUS warning message (re: implied return value)

0.991   2003-12-28  [NB]
  * R code
    + Removed automatic calculation of `mgp' from .addAxis and .addLabels
    + Added support for a user-passed `mgp' parameter
      - `mgp' should now be set to a default value, such as c(1.9, 0.2, 0) when the package is loaded

0.99  2003-12-22  [NB]
  * Computational
    + Bug fix: previously, 'clip()' assumed that if the first vertex in a polygon was not equal to 1, then the 
      - polygon must be a hole; now, it looks at the first two vertices to determine increasing or decreasing order.

0.985  2003-12-20  [NB]
  * R code
    + In .createPolyProps(), changed codes(ordered(...)) to as.integer(ordered(...)) to stop the related 'deprecated' error  message.

0.984  2003-08-22  [NB]
  * R code
    + Removed the .checkDots function because it didn't seem  necessary
    + Removed a secton in .addAxis that was setting mex to 0

0.983  2003-08-21  [NB]
  * C|R code
    + C functions renamed:
      - `ulConv' --> `convUL'
      - `locateEvents' --> `findPolys'
    + Added a .checkDots function to look for mai in dots (may conflict with plt)

0.982  2003-08-19  [NB]
  * R code
    + Added an `axes' parameter to the plot functions, to disable the plotting of the axis

0.981  2003-08-18  [NB]
  * R code
    + Added an internal `.fixGSHHSWorld' function for closing Antarctica from the GSHHS data
    + Made it so calcArea, etc. don't use "invisible" (or such) to  return objects
    + Fixed default colours (polygons or polylines determines  default `col')

0.98  2003-08-15  [NB]
  * Computational
    + Renamed functions:
      - 'ulConv()' --> 'convUL()'
      - 'locateEvents()' --> 'findPolys()'
      - 'clipPolys()' --> 'clip()'
    + tckMajor renamed to tck
    + tckMinor is now based on tck, rather than the other way around

0.97  2003-08-14  [NB]
  * Computational
    + Fixed bug in 'calcArea()' where polygons with multiple components were not being summed.

0.962  2003-08-12  [NB]
  * R code
    + Minor bug corrected in combineEvents in S (but not R)

0.961  2003-08-06  [NB]
  * R code
    + Made minor changes to addPolys to allow for different line types  for shading lines

0.96  2003-08-05  [NB]
  * Computational
    + Fixed epsilon.

0.953  2003-08-01  [NB]
  * R code
    + Made minor changes to .addLabels and .addAxis

0.952  2003-07-30  [NB]
  * R code
    + Cleaned up the .addAxis and .addLabels functions: now labels are moved depending on the lengths of the tick marks

0.951  2003-07-29  [NB]
  * R code
    + Working on cleaning up the labelling of the axis

0.95  2003-07-27  [NB]
  * Computational
    + Rewrote 'closePolys()'

0.94  2003-07-23  [NB]
  * C code
    + Moved 'pointInPolygon' to polygons.c/.h
    + Renamed ulconv.c/.h to conversions.c/.h (in case we add more conversions).
    + Creating a "floating.h" for floating point equality test, etc.
    + Moved 'clipPolygon' to polygons.c/.h

0.931  2003-07-22  [NB]
  * R code
    + Fixed several bugs
    + Rearranged the source file into alphabetical order
    + Cleaned up several inconsistencies

0.93  2003-07-21  [NB]
  * Computational
    + Removed 'lines_intersect()' from the file (not used).
  * C code
    + Moved 'calcPolygonArea' to its own files, polygons.c/.h
    + In time, polygon clipping should be moved to the polygons.c/.h files.
  * R code
    + Fixed addPolys so it takes advantage of the new polyProps structure
    + Renamed locateEvents --> findPolys
    + Implemented locateEvents and locatePolys

0.922  2003-07-18  [NB]
  * R code
    + Continued working on those plotting routines...
    + Rewrote portions of .createPolyProps to support more efficient  plotting
    + Made it so polyProps always contains an SID column

0.921  2003-07-17  [NB]
  * R code
    + Finished updating the validate routines
    + Read through the complete code looking for bugs
    + Started to optimize the plotting routines...

0.92  2003-07-16  [NB]
  * Computational
    + Changed the interface to 'fixPOS()' so that it will take floating-point POSs as input.
    + Moved 'fixBound()' to R.
    + Updated locatePoints() to test the polyset before locator() is called
      - made it hidden
    + Renamed OLDPOS to oldPOS (to match documentation)
    + Improved validation of data types: checking for NAs, rewrote  validate routines

0.911  2003-07-15  [NB]
  * R code
    + Fixed bug in .createPolyProps, where elements in the PID/SID columns could be factors (and this would result in wrong polygons being plotted in S-Plus)
    + Fixed numerous other bugs

0.91  2003-07-14  [NB]
  * Documentation
    + Started the change log
  * C code
    + Fixed a bug in all the C-function wrappers so that they work when one row is returned
    + Fixed numerous other bugs

# Versions below are artificial constructs
# ----------------------------------------
0.90  2003-07-11  [NB]
  * R code
    + Implemented convUL and calcArea

0.80  2003-07-10  [NB]
  * R code
    + Implemented makeGrid and makeProps

0.70  2003-07-09  [NB]
  * R code
    + Fixed various bugs such as incorrectly scaled axis ticks
    + Made locateEvents aware of holes
    + Renamed "proj" to "projection"
    + Increased efficiency of pnpoly
    + Generated skeletons for new functions

0.60  2003-07-08  [NB]
  * R code
    + Verified the "correction" of PolyChar
    + Corrected a bug showing up in R
    + Renamed polyChar to polyProps

0.50  2003-07-07  [NB]
  * R code
    + Cleaned up some functions
    + Changed PolyChar (an instance of PolyChar) back to the strict definition from the specifications

0.40  2003-07-04  [NB]
  * R code
    + Continued to fill functions (closePolys, locateEvents, combineEvents, ...)

0.30  2003-07-03  [NB]
  * R code
    + Continued to fill functions (addLines, addPolys, ...)

0.25  2003-07-02  [NB]
  * R code
    + Continued to fill functions (clipLines, clipPolys, ...)

0.20  2003-06-30  [NB]
  * R code
    + Continued to fill functions, and get the interaction between the S-Plus/R and C code working correctly (fixBounds, fixPOS, ...)

0.10  2003-06-27  [NB]
  * R code
    + Created empty functions, started to fill them
##=====================================================================================
## Nicholas Boers starts building PBSmapping based on documentation from Jon T. Schnute

