Version 5 (modified by 10 years ago) ( diff ) | ,
---|
CS-Map RFC 8 - CS-MAP Clean Up
Remove and/or delete as appropriate obsolete and unused source code modules and unused code. Includes removing same from make files and project files.
Status
RFC Template Version | (1.0) |
Submission Date | 09 May 2014 |
Last Modified | Norm Olsen Timestamp |
Author | Norm Olsen |
RFC Status | Approved |
Implementation Status | In Progress |
Proposed Milestone | 14(?) |
Assigned PSC guide(s) | (when determined) |
Voting History | (vote date) |
+1 | Olsen Wisniewski |
+0 | |
-0 | |
-1 | |
no vote |
Overview
Over the years, CS-MAP has accumulated a lot of unused and obsolete code which is no longer necessary. This baggage has accumulated due to a variety of factors:
- Being maintain by separate organizations and developers
- Features being replaces by new RFC's.
- Provisions for obsolete and/or non-standard operating system and compilers.
- Old features maintained for legacy purposes which are now a liability rather than a positive.
The intent of this RFC is to itemize the proposed clean up efforts, have them reviewed and discussed, and upon final agreement, implement the clean up.
Motivation
Implementing this clean up will:
- reduce the amount of code maintained,
- reduce confusion to new users and developers,
- remove unnecessary restrictions originally written in to accommodate obsolete platforms/OS/compilers
- improve build times
- reduce distributable sizes
Proposed Solution
The following is a list of items proposed for the clean up. Modifications, deletions, and additions are encouraged.
- Remove the 'C' based CS_Test module. It hasn't been maintained and is rarely, if ever, used any more.
- Delete (SVN meaning of Delete) pre-RFC-2 geodetic transformation code modules which are no longer referenced.
- Remove all code pertaining specifically to Windows CE.
- Correct all warnings issued by VC++ and gcc compilers.
- Enhance make files for Windows and Linux so that single make command builds the entire product.
- Remove all .gdc and .mrt files from dictionaries and distributions.
- Modify the capitalization of file names so that all comform to a consist naming convention.
- Rename modules and internal functions to names conforming to the base CS-MAP naming convention.
- Implement pre-compiled headers where ever possible in make/project files.
- Re-organize the csTestCpp test module to better reflect the actual usage for the product (i.e. Categories in, Groups out, 3D coordinate testing, etc.)
Implications
I submit this as an RFC as it is likely that some of the changes may require an tweak or two external to the library itself. And also, a project such as this needs a lot of testing in different environments. Without the support of the entire community, embarking on this worthwhile project could be dangerous. Assuming that no one is using the CS-Test.c module, and that few (if any) use modules below the EXP_LVL1 external interface, no external changes are envisioned, BUT . . .
Implementation Plan
Each of the above listed items will be implemented, tested, reviewed, and submitted separately to the extent possible. The easiest and safest will be performed first. The following are considered to be the easiest and safest:
- Remove the CS_Test module.
- Delete RFC-2 left overs from the repository and remove all reference in project/make files.
- Remove unused .gdc and all .mrt files from the distribution and code (i.e. the Dictionary compiler).
- Remove the remaining .gdc files which are still used (Vertcon and Geoid Height), replacing them with the concept of simply using whatever files exist in a predefined folder.
- Modify the names of source code modules to comply with the basic CS-MAP naming convention. (Changes to module names, and hence changes to make/project files only. Function/Interface names remain unchanged.)
Test Plan
The existing, then the improved, csTestCpp module will be used to verify computational results remain the same and that basic features retain functionality and performance.
Funding and Resources
Hopefully, the primary patrons of the library will contribute funding and/or personnel resources to support some or all of these efforts. In absence thereof, Norm Olsen will perform the work. In the latter case, the effort will take 12 or more months to complete.
Implementation Notes
June 19, 2014: What has been dubbed Phase One is now pretty much complete. The table below shows module deletions and name changes which may be of specific interest to users of the library. Precompiled headers are now used for Windows builds; use in Linux is deferred as the Linux build is so fast the effort seemed to be "not worth the effort". The MAKE files have been rewritten, and an over all make file for both Windows and Linus are now available. The MAKE files have been designed to specifically support efficient maintenance of several versions of the library in both the Windows and Linux environments. Testing of the MAKE files in environments other than Windows and Linux (CentOS 6.3 to be specific) have not been performed as such additional enviornments are not available to the developer. Am now proceeding to Phase Two: eliminating warning messages and removing obsolete code.
Note: modules marked as SVN delete will remain in the SVN repository, select revision 2452 or earlier to retrieve.
Action Taken | Original Name | New Name | Comment |
Renamed | CS_ats77New.c | CS_ats77.c | |
Renamed | CS_japan.c | CS_japanOld.c | Eventually deleted, see below |
Renamed | CS_japanNew.c | CS_japan.c | |
Renamed | cs_ctio.c | CS_ctio.c | |
Renamed | cs_wellknowntext.cpp | CS_wellknowntext.cpp | |
Renamed | csCsvFileSupport.cpp | CS_csvFileSupport.cpp | |
Renamed | csEpsgStuff.cpp | CS_epsgStuff.cpp | |
Renamed | csEpsgSupport.cpp | CS_epsgSupport.cpp | |
Renamed | csNameMapper.cpp | CS_nameMapper.cpp | |
Renamed | cs NameMapperSupport.cpp | CS_nameMapperSupport.cpp | |
Renamed | rcWellKnownText.cpp | CS_wktObject.cpp | |
Renamed | rcWktKonstants.cpp | CS_wktObjKonstants.cpp | |
Renamed | rcWellKnownText.hpp | cs_WktObject.hpp | |
Renamed | csCsvFileSupport.hpp | cs_CsvFileSupport.hpp | |
Renamed | csNameMapperSupport.h | cs_NameMapperSupport.h | |
Renamed | csNameMapper.hpp | cs_NameMapper.hpp | |
Renamed | csepsgstuff.h | cs_EpsgStuff.h | |
Removed from Projects | cs_hlp.h | MFC stuff | |
Removed from Projects | cs_mfc.h | MFC stuff | |
Removed from Projects | cs_res.h | MFC stuff | |
Removed from Projects | mgTest.h | MFC stuff | |
Removed from Projects | csBrowser.cpp | MFC stuff | |
Removed from Projects | csDataDir.cpp | MFC stuff | |
Removed from Projects | csDualBrowse.cpp | MFC stuff | |
Removed from Projects | csEdit.cpp | MFC stuff | |
Removed from Projects | csKeyNm.cpp | MFC stuff | |
Removed from Projects | csTest.cpp | MFC stuff | |
Removed from Projects | csWinHlp.cpp | MFC stuff | |
Removed from Projects | dtEdit.cpp | MFC stuff | |
Removed from Projects | dtSelect.cpp | MFC stuff | |
Removed from Projects | elEdit.cpp | MFC stuff | |
Removed from Projects | elSelect.cpp | MFC stuff | |
Removed from Projects | gdcEdit.cpp | MFC stuff | |
Removed from Projects | mgTest.cpp | MFC stuff | |
Removed from Projects | csmap.rc | MFC stuff | |
Deleted | CS_japanOld.c | SVN delete | |
Deleted | CS_caDatum.c | SVN delete | |
Deleted | CS_caV1GridFile.c | SVN delete | |
Deleted | CS_caV2GridFile.c | SVN delete | |
Deleted | CS_ch1903.c | SVN delete | |
Deleted | CS_csrs.c | SVN delete | |
Deleted | CS_dhdn.c | SVN delete | |
Deleted | CS_dtAgd66ToGda94.c | SVN delete | |
Deleted | CS_dtAgd84ToGda94.c | SVN delete | |
Deleted | CS_dtAts77ToNad83.c | SVN delete | |
Deleted | CS_dtCh1903ToPlus.c | SVN delete | |
Deleted | CS_dtDhdnToEtrf89.c | SVN delete | |
Deleted | CS_dtEd50ToEtrf89.c | SVN delete | |
Deleted | CS_dtNad27ToAts77.c | SVN delete | |
Deleted | CS_dtNad27ToNad83.c | SVN delete | |
Deleted | CS_dtNad83ToHarn.c | SVN delete | |
Deleted | CS_dtNzdg49ToNzgd2k.c | SVN delete | |
Deleted | CS_dtRgf93ToNtf.c | SVN delete | |
Deleted | CS_dtTokyoToJgd2k.c | SVN delete | |
Deleted | CS_hpgn.c | SVN delete | |
Deleted | CS_nad27.c | SVN delete | |
Deleted | CS_nzgd49.c | SVN delete | |
Deleted | CS_rgf93ToNtf.c | SVN delete | |
Deleted | CS_usDatum.c | SVN delete | |
Deleted | CS_usGridFile.c | SVN delete | |
Deleted | CSdatumSupport.c | SVN delete | |
Deleted | CSgridCellCache.c | SVN delete | |
Deleted | CSnad27ToCsrs.c | SVN delete | |
Deleted | CSnad83ToCsrs.c | SVN delete |
September 10, 2014: What has been dubbed as Phase Two is now complete. All compiler warnings have been removed at the (VC++) /W4 level and (gcc) -w level. Static code analysis on all modules was completed and all reports either corrected and/or flagged. See the /*lint*/ and lint comments in the code, and the exceptions listed in lcl.lnt. Static analysis was performed using PC-Lint 9.00k. All supported versions of Visual Studio (Win32/x64, Release/Debug) and Linux (x86/x64 on gcc/g++ 4.7 using CentOS 6.3) were built and tested. Geodetic Data Catalog files remain in use for Geoid Height and Vertcon; no changes there.
The COnsole Test facility will report EPSG audit error if used for EPSG database newer than 6.02; EPSG has now released 8.05. Fixing these issues is yet another project which may need to be funded.
A few additional name changes and file deletions were made:
Action Taken | Original Name | New Name | Comment |
Renamed | CS_COMP.c | CS_Comp.c | |
Renamed | cscscomp.c | CScscomp.c | |
Renamed | CS_GeoidHeight.c | CS_geoidHeight.c | |
Renamed | CS_VertconUS.c | CS_vertconUS.c | |
Renamed | csTestCpp.cpp | CS_TestCpp.c | |
Renamed | csTestCpp.exe | CS_TestCpp.exe | |
Deleted | CSmrcomp.c | Obsolete since RFC-2 | |
Deleted | CS_ed50.c | Obsolete since RFC-2 | |
Deleted | csBrowser.cpp | MFC Stuff, Phase One delete was not completed | |
Deleted | csmap.rc | MFC Stuff, Phase One delete was not completed | |
Deleted | Agd66ToGda94.gdc | Geodetic Data Catalog, obsolete since RFC-2 | |
Deleted | Agd84ToGda94.gdc | Geodetic Data Catalog, obsolete since RFC-2 | |
Deleted | Ats77ToCrsr.gdc | Geodetic Data Catalog, obsolete since RFC-2 | |
Deleted | Ch1903ToPlus.gdc | Geodetic Data Catalog, obsolete since RFC-2 | |
Deleted | DhdnToEtrf89.gdc | Geodetic Data Catalog, obsolete since RFC-2 | |
Deleted | Ed50ToEtrf89.gdc | Geodetic Data Catalog, obsolete since RFC-2 | |
Deleted | Nad27ToCsrs.gdc | Geodetic Data Catalog, obsolete since RFC-2 | |
Deleted | Nad27ToAts77.gdc | Geodetic Data Catalog, obsolete since RFC-2 | |
Deleted | Nad27ToNad83.gdc | Geodetic Data Catalog, obsolete since RFC-2 | |
Deleted | Nad83ToCsrs.gdc | Geodetic Data Catalog, obsolete since RFC-2 | |
Deleted | Nad83ToHarn.gdc | Geodetic Data Catalog, obsolete since RFC-2 | |
Deleted | Nzgd49ToNzgd2K.gdc | Geodetic Data Catalog, obsolete since RFC-2 | |
Deleted | Rgf93ToNtf.gdc | Geodetic Data Catalog, obsolete since RFC-2 | |
Deleted | TokyoToJgd2k.gdc | Geodetic Data Catalog, obsolete since RFC-2 | |
Deleted | Nad27ToAts77.gdc | Geodetic Data Catalog, obsolete since RFC-2 | |
Deleted | Nad27ToAts77.gdc | Geodetic Data Catalog, obsolete since RFC-2 |