PBSmapping Changes ================== 2.59 2008-10-07 Rowan - 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 Rowan - Modified function '.addLabels()' to NOT allow values in '...' to flow through to 'title()'. Conflicts with formal arguments like 'xlab'. 2.57 2008-07-24 Rowan - Modified function '.addLabels()' to allow values in '...' to flow through to 'title()'. - POSTED ON CRAN. 2.56a 2008-07-23 Jon - Modified the vignette and changed the file name to 'PBSmappingIntro'. 2.56 2008-07-16 Rowan - Revised 'importShapefile()' and fixed bug when 0-vertex polygons occur. - Added '00ReadMe' vignette. - Moved User's Guide and 'ChangeLog.txt' to '../inst/doc'. - Removed 'gamma' fom 'legalNames' in '.plotMaps'. 2.55 2008-01-22 Rowan - Revised 'calcConvexHull()' in PBSmapping.r to use 'chull()' in package grDevices - Removed 'calcConvexHull' from PBSmapping.c - Removed 'conveHull', 'sortPointList', and 'rightTurn' from polygons.c (and polygons.h). - Substituted 'findCells()' for 'findPolys()' in '.PBSfig09()'. - Built with R-2.6.1. - POSTED ON CRAN. 2.54 2007-10-03 Rowan - Updated User's Guide - Built with R-2.6.0. - POSTED ON CRAN. 2.53 2007-10-01 Nick - 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 elimiate a warning message from the C compiler. - 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. - Modified 'importPolys (...)', 'importEvents (...)', and 'importLocs (...)' to change 'T' to 'TRUE' and '=' to '<-'. - 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.52a 2007-09-30 Nick - 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 Rowan - 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 Rowan - 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. - POSTED ON CRAN. 2.50 2007-06-29 Rowan - Revised the User's Guide & Rd files. Bumped up version for release. 2.17 2007-06-06 Rowan - 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 - Revised the UG. 2.16 2007-06-06 Rowan - Revised the User's Guide. - Checked and revised 'aleutian' bathymetry example for Appendix B. - Revised Rd files. - Removed the function 'outputGSHHS()' from .\R\PBSmapping.r 2.15 2007-06-04 Rowan - Recoded '.fixGSHHSWorld()' - Added R code to 'importGSHHS()' to activate argument n (in C, SEXP minVerts is not used). - Rebuilt data objects: 'nepacLL', 'nepacLLhigh', 'worldLL', 'worldLLhigh' using DB gshhs_1.5.zip - Extracted and removed figure functions from .\R\PBSmapping.r and placed them into file: .\R\PBSfigs.r - 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 Alex - 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 Alex - R/PBSmapping.r: Added 'outputGSHHS()', 'importPolys()', 'importEvents()', 'importLocs()'. - src/convGSHHS.c: handles .Call interface - man/importGSHHS.Rd: Created documentation - man/outputGSHHS.Rd: Created documentation 2.12 2007-02-08 Alex - R/PBSmapping.r: Added 'importGSHHS()'. - src/convGSHHS.c: Created underlying C code for 'importGSHHS'. - man/importGSHHS.Rd: Created documentation 2.11 2007-01-23 Rowan - 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. - Resaved the data files using 'save("data",file="data.rda")'.Compresses binary files more than earlier saves. 2.10b 2007-01-03 Jon - Built for R only, with first attempts to remove traces of S-PLUS. 2.10a 2006-11-14 Nick - 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 Nick - R/PBSmapping.R: Added argument 'PACKAGE = "PBSmapping"' to all .C() calls. - man/contourLines.Rd: Removed (only necessary for S-PLUS). - src/gpc.c: Removed "../common/" from #include's. - src/PBSmapping.c: Removed "../common/", "../gpc/", and "../mcd" from #include's. 2.09 2006-09-04 Nick - 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. - 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. - POSTED ON CRAN. 2.08g 2006-08-25 Nick - RS_Docs/calcVoronoi.Rd: Added comments about setting the "projection" and "zone" attributes. - 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.08f 2006-08-15 Nick - RS_Source/PBSmapping '.addCorners()': Cleaned up the code. - 'calcVoronoi()': Cleaned up the code. 2.08e 2006-08-10 Nick - C/common/polygons.c 'convexHull()': Fixed a (trivial) bug in 'calcConvexHull()' that caused it to produce incorrect (bizarre) results. - RS_Source/PBSmapping '.addCorners()': Added function. 2.08d 2006-08-04 Nick - RS_Docs/calcVoronoi.Rd: Updated to reflect the removed "close" argument. - RS_Source/PBSmapping 'calcVoronoi()': Removed 'close' argument. 2.08c 2006-07-20 Nick - RS_Docs/dividePolys.Rd: Minor updates. - RS_Docs/combinePolys.Rd: Minor updates. - 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.08b 2006-07-19 Nick - RS_Docs/calcVoronoi.Rd: Created a better example based on Rowan's code/suggestion. - RS_Source/PBSmapping 'calcVoronoi()': Corrected bug where the function would fail when a polygon contained more than two points on a boundary. 2.08a 2006-07-18 Nick - RS_Source/PBSmapping '.checkProjection()': Updated error message since it can compare the projection of non-PolySet with that of a plot region. - 'addLabels()': Identified and fixed bug where EventData containing a PID/SID column would incorrectly be recognized as PolyData. - 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()'). - RS_Docs/importShapefile.Rd: Cleaned up documentation and expanded it for clarity. 2.08 2006-07-17 Nick - R_Other/DESCRIPTION (Suggests): Removed suggests for 'sp' since not (yet) suggested. - RS_Source/PBSmapping '.pbsproj()': Commented out to make release 2.08. 2.07c 2006-07-16 Nick - RS_Docs/importShapefile.Rd: Updated to reflect additional argument and ability to import DBFs. - RS_Source/PBSmapping (importShapefileDBF): Removed function. - 'importShapefile()': Updated function to import DBFs. 2.07b 2006-07-13 Nick - RS_Source/PBSmapping 'calcVoronoi()': Added warning for data of an "LL" projection. - RS_Docs/calcVoronoi.Rd: Added "close" argument to match code. - RS_Source/PBSmapping 'calcVoronoi()': Added argument "close = TRUE". When TRUE, calls "closePolys" to close the polygons (i.e., corners). 2.07a 2006-07-10 Nick - RS_Source/PBSmapping 'dividePolys()': Created new function. - RS_Docs/combinePolys.Rd: Created documentation for 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 Nick - 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_Docs/importShapefileDBF.Rd: Created. - RS_Docs/importShapefile.Rd: Created. - RS_Source/PBSmapping '.checkRDeps()': Made hidden by renaming from 'checkRDeps()'; updated other functions to reflect the change. - '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. - RS_Docs/calcConvexHull.Rd: Updated description of "xydata" to improve clarity. - RS_Docs/calcVoronoi.Rd: Created. 2.06f 2006-07-06 Nick - RS_Source/PBSmapping 'calcVoronoi()': Updated to create a consistent interface with other PBS Mapping functions. - 'calcVoronoi()': Resolved issue re: ordering of points. 2.06e 2006-07-05 Nick - RS_Source/PBSmapping 'calcVoronoi()': Added preliminary version of new "calcVoronoi" function. - RS_Docs/addPolys.Rd: Added "colHoles" argument. - RS_Docs/plotPolys.Rd: Added "colHoles" argument. - RS_Docs/plotMap.Rd: Added "colHoles" argument. - RS_Source/PBSmapping (addPolys): Finished adding a first version of the "colHoles" argument. - 'locatePolys()': If a variable named "SID" existed before the call, it would break the function. Fixed. 2.06d 2006-07-04 Nick - RS_Source/PBSmapping 'findCells()': Removed final call to 'as.LocationSet()' to improve performance and added code to manually set the class. - '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. - '.preparePolyProps()': Simplified the code. 2.06c 2006-06-21 Nick - R_Other/DESCRIPTION (Suggests): Added suggests for "foreign", "sp", and "maptools" to use the new import functionality. 2.06b 2006-06-19 Nick - RS_Source/PBSmapping '.pbsproj()': Created function. - 'importShapefile()': Created function. - 'SpatialPolygons2PolySet()': Created function. - 'SpatialLines2PolySet()': Created function. - 'SpatialPoints2PolySet()': Created function. - 'importShapefileDBF()': Created function. - '.getBasename()': Created function. 2.06a 2006-05-24 Nick - 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 Nick - SPLUS6.sh: Added the path to the S-PLUS 6.2 CHAPTER command. - RS_Source/PBSmapping '.getGridPars()': Replaced the call to 'identical()' with '!is.character(all.equal())' because S-PLUS 2000 lacks an 'identical' function. - POSTED ON CRAN. 2.05 2006-05-10 Nick - 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'. - 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'. - POSTED ON CRAN. 2.04 2004-11-14 Nick - 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 - POSTED ON CRAN. 2.03 2005-06-01 Nick - POSTED ON CRAN. 2.02 2004-11-18 Nick - POSTED ON CRAN. 2.01 2004-09-22 Nick - POSTED ON CRAN. 2.00 2004-08-23 Nick 1.99b 2004-08-16 Nick - Moved 'isPolyConvex()' to polygons.c - Moved 'nPolyIntersects()' to polygons.c - Moved 'isRetrace()' to polygons.c - Moved 'linesIntersect()' to polygons.c 1.99a 2004-08-03 Nick - Added note to 'isPolyConvex()' - POSTED ON CRAN. 1.99 2004-07-29 Nick - Updated 'joinPolys()' to use existing PIDs when either 'polysA' or 'polysB' contains only one "generic" polygon 1.98 2004-07-28 Nick - Rewrote 'joinPolys()' and added several functions ('gpcOutputPoly()', 'gpcCreatePoly()') to support it; the code is much cleaner (and more powerful now). 1.93 2004-07-21 Nick 1.92 2004-07-18 Nick 1.91 2004-07-12 Nick 1.90d 2004-07-05 Nick - Renamed 'convexHull()' to 'calcConvexHull()'; it called 'calcConvexHull()', and renamed this call to 'convexHull()'. 1.90c 2004-06-30 Nick - Added 'isConvex()' - Added 'nPolyIntersects()' 1.90b 2004-06-29 Nick - Added 'isRetrace()' to support 'isIntersecting()'. - Added 'lineIntersect()' to support 'isIntersecting()'. 1.90a 2004-06-28 Nick - Added 'isIntersecting()' to determine if a polygon is self-intersecting. 1.90 2004-06-22 Nick 1.80 2004-06-21 Nick - Changed 'calcArea()' to match new interface for 'calcPolyArea()'; can now return negative areas for holes; substantially simplified function. 1.70 2004-06-18 Nick - Removed 'fixPOS()' and 'integrateHoles()'. 1.60 2004-06-17 Nick - Cleaning - Added 'rollupPolys()' to replace 'fixPOS()' and 'integrateHoles()' - but it does much more than those two. 1.50 2004-06-16 Nick - Adjusted paths to #include's 1.40 2004-06-15 Nick - Renamed 'integrateHoles()' to 'mergePolys()'; now merges in all SIDs when specified as well as those representing holes. - Fixed huge memory leak and bug in 'joinPolys()' -- the clip polygon wasn't handled correctly. 1.30 2004-06-14 Nick 1.20d 2004-06-10 Nick - 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()' 1.20c 2004-06-09 Nick - 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. 1.20b 2004-06-08 Nick - Added 'thickenPolys()' (only supports UTM). 1.20a 2004-06-02 Nick - Updated 'thinPolys()' to support UTM. 1.20 2004-05-30 Nick 1.10c 2004-05-26 Nick - Fixed huge memory leaks in 'joinPolys()'. - Added support for all R-accessible functions to interface with MemCheckDeluxe. 1.10b 2004-05-24 Nick - 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.10a 2004-05-20 Nick - Added 'convexHull()' 1.10 2004-05-16 Nick 1.00e 2004-05-12 Nick - Renamed 'clipToPoly()' to 'joinPolys()'. - Extensively cleaned up 'joinPolys()' 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!!! 1.00d 2004-05-11 Nick - Renamed 'clipPoly()' to 'clipToPoly()'. 1.00c 2004-05-10 Nick - 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). - We will need to rename the R function from 'clipPoly' to something more intuitive. 1.00b 2004-05-08 Nick - Added 'clipPoly()' function to clip a polygon against another polygon. 1.00a 2004-05-04 Nick - Added 'thinPolys()' function. 1.00 2004-01-04 Nick - Cosmetic changes to the code. 0.99 2003-12-22 Nick - 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.98 2003-08-15 Nick - Renamed functions: 'ulConv()' --> 'convUL()' 'locateEvents()' --> 'findPolys()' 'clipPolys()' --> 'clip()' 0.97 2003-08-14 Nick - Fixed bug in 'calcArea()' where polygons with multiple components were not being summed. 0.96 2003-08-05 Nick - Fixed epsilon. 0.95 2003-07-27 Nick - Rewrote 'closePolys()' 0.94 2003-07-23 Nick - 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.93 2003-07-21 Nick - Removed 'lines_intersect()' from the file (not used). - Moved 'calcPolygonArea' to its own files, polygons.c/.h - In time, polygon clipping should be moved to the polygons.c/.h files. 0.92 2003-07-16 Nick - Changed the interface to 'fixPOS()' so that it will take floating-point POSs as input. - Moved 'fixBound()' to R. 0.91 2003-07-14 Nick - Started the change log